diff --git a/frontend/src/components/Board/Card/DeleteCard.tsx b/frontend/src/components/Board/Card/DeleteCard.tsx index 9fd7cb4ee..2a402061b 100644 --- a/frontend/src/components/Board/Card/DeleteCard.tsx +++ b/frontend/src/components/Board/Card/DeleteCard.tsx @@ -1,4 +1,11 @@ -import AlertCustomDialog from '@/components/Primitives/AlertCustomDialog'; +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, +} from '@/components/Primitives/AlertDialog'; +import Flex from '@/components/Primitives/Flex'; +import Text from '@/components/Primitives/Text'; import useCards from '@/hooks/useCards'; interface DeleteProps { @@ -42,21 +49,22 @@ const DeleteCard = ({ }; return ( - 100} - cancelText="Cancel" - confirmText="Delete card" - handleClose={handleClose} - handleConfirm={handleDelete} - title="Delete card" - variant="danger" - text={ - <> - Do you really want to delete {cardTitle} card? - - } - /> + + + Do you really want to delete the following card? + + {cardTitle} + + + + Cancel + + + Delete card + + + + ); }; diff --git a/frontend/src/components/Board/Column/partials/UpdateColumnDialog/index.tsx b/frontend/src/components/Board/Column/partials/UpdateColumnDialog/index.tsx index 9b509746a..2850852c7 100644 --- a/frontend/src/components/Board/Column/partials/UpdateColumnDialog/index.tsx +++ b/frontend/src/components/Board/Column/partials/UpdateColumnDialog/index.tsx @@ -1,25 +1,19 @@ -import Icon from '@/components/icons/Icon'; -import { - DialogTitleContainer, - StyledDialogTitle, -} from '@/components/Primitives/AlertCustomDialog/styles'; +// TODO: AlertDialog handle is weird! import { AlertDialog, + AlertDialogAction, AlertDialogCancel, AlertDialogContent, } from '@/components/Primitives/AlertDialog'; import Flex from '@/components/Primitives/Flex'; import Input from '@/components/Primitives/Input'; -import Separator from '@/components/Primitives/Separator'; import { SchemaChangeColumnName } from '@/schema/schemaChangeColumnName'; -import { ReactNode, useRef } from 'react'; +import { useRef } from 'react'; import { joiResolver } from '@hookform/resolvers/joi'; import { FormProvider, useForm, useWatch } from 'react-hook-form'; import { styled } from '@/styles/stitches/stitches.config'; -import Button from '@/components/Primitives/Button'; import useColumn from '@/hooks/useColumn'; import CardType from '@/types/card/card'; -import { ButtonsContainer } from '@/components/Board/Settings/styles'; import Text from '@/components/Primitives/Text'; import TextArea from '@/components/Primitives/TextArea'; @@ -31,7 +25,6 @@ type UpdateColumnNameProps = { cards: CardType[]; isOpen: boolean; setIsOpen: (value: boolean) => void; - children?: ReactNode; cardText?: string; isDefaultText?: boolean; type: string; @@ -48,7 +41,6 @@ const UpdateColumnDialog: React.FC = ({ cards, isOpen, setIsOpen, - children, isDefaultText, type, }) => { @@ -101,87 +93,56 @@ const UpdateColumnDialog: React.FC = ({ return ( - {children} - - - - {type === 'ColumnName' ? 'Update column name' : 'Activate card default text'} - - - - - - - - + { handleConfirm(title, text); })} + direction="column" + gap="16" > - - - - {type === 'ColumnName' ? ( - - ) : ( - <> - - This default text will be visible as placeholder when someone is creating a - new card. - -