move move frontend to progress-test

This commit is contained in:
João Geonizeli
2022-07-21 21:16:59 -03:00
parent f8d5d08447
commit 386050d4ad
129 changed files with 159374 additions and 39 deletions

View File

@@ -0,0 +1,46 @@
import React, { FC } from "react"
import { Button } from "../Button"
import { Modal } from '../Modal'
type DialogType = 'confirmation' | 'notice'
type Props = {
type?: DialogType
title: string
isOpen?: boolean
text?: any
setIsOpen: (state: boolean) => void
onConfirmation: () => void
};
export const Dialog: FC<Props> = ({
type = 'confirmation',
title,
isOpen: open = false,
setIsOpen,
onConfirmation,
text,
}) => {
return (
<Modal
title={title}
isOpen={open}
setIsOpen={setIsOpen}
buttons={
<>
{type === 'confirmation' &&
<Button onClick={() => setIsOpen(false)}>
Cancelar
</Button>
}
<Button type="primary" onClick={onConfirmation}>
Confirmar
</Button>
</>
}
>
{text}
</Modal>
)
};

View File

@@ -0,0 +1 @@
export * from "./Dialog";