-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: 🐛 Ajuste do tamanho do botao reload Fixado tamanho do botão para corrigir erro no Header * Criado botao * Adicionado funcoes para o botao. COMENTADO OVERFLOW-X:HIDDEN no global.css * removendo necessidade de remover overflow-x:hidden no global.css * resolvendo funcoes * Finalizando. durante meus testes esqueci de inverter o estado inicial do botão. * aplicado o design recomendado pela barbiebrega * Removido erro de tipagem. * #287 - [FIX] Itens Cadastrados sem Categoria estão indo para Medicamentos (#296) * #287 * Delete src/components/Icon directory * Update SupplyRowInfo.tsx * RollBack SupplyRowInfo.tsx * Update SupplyRow.tsx * Update EditShelterSupply.tsx * Update CreateSupply.tsx - De forma a evitar termos genéricos demais, é solicitado ao usuário que registre um recurso com no mínimo 3 caracteres. Validação via Yup. * Update CreateSupply.tsx - Bloqueia cadastro de items com números e caracteres especiais. Validação via Yup. * Update CreateSupply.tsx * Update CreateSupply.tsx - Limite de 30 itens retornados enquanto o usuário está digitando o termo desejado. * Update CreateSupply.tsx - Bloqueia caracteres especiais; - Requer no mínimo 3 letras (bloqueia apenas números). * Update - Melhoria na listagem de suplementos (#249) * feat: add multi option for priority queryParam * fix(filtro-shelters): add missing typing definition * fix: name of array of priority to priorities, priority field changed from string to array and removed unused import ---------
- Loading branch information
Showing
16 changed files
with
572 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { useState } from "react" | ||
import { ArrowUp } from "lucide-react" | ||
|
||
|
||
const BackToTop =() => { | ||
|
||
const [isVisible, setVisibility] = useState(false) | ||
|
||
const scrollToTop = () => { | ||
let root = document.getElementById('root') | ||
if (!root) {return} | ||
|
||
root.scrollTo({top:0, behavior:"smooth"}) | ||
|
||
} | ||
|
||
document.getElementById("root")?.addEventListener('scroll', (e) => { | ||
if (e.target === null) {return} | ||
let CurrentScrollHeight = (e.target as HTMLElement).scrollTop | ||
let WindowHeight = window.innerHeight | ||
|
||
if ( CurrentScrollHeight > WindowHeight / 2) { | ||
setVisibility(true) | ||
} else { | ||
setVisibility(false) | ||
} | ||
}) | ||
|
||
|
||
return (isVisible && ( | ||
<button | ||
className=" fixed ease-in-out hidden sm:flex justify-center items-center duration-300 | ||
bg-red-600/75 focus:bg-red-700 hover:bg-red-700 z-[100] shadow-slate-600/75 | ||
right-6 bottom-6 rounded-full shadow-md | ||
w-12 h-12 " | ||
onClick={scrollToTop} | ||
><ArrowUp color="white" /></button> | ||
)); | ||
} | ||
|
||
export { BackToTop }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { BackToTop } from "./BackToTop"; | ||
|
||
export { BackToTop }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.