Refactor buttons (#1257)
* Refactor buttons * Complete components creation * Complete refactoring * fix lint * Complete button work
This commit is contained in:
@ -5,11 +5,8 @@ import { useRecoilValue } from 'recoil';
|
||||
import { useAuth } from '@/auth/hooks/useAuth';
|
||||
import { currentUserState } from '@/auth/states/currentUserState';
|
||||
import { AppPath } from '@/types/AppPath';
|
||||
import { ButtonVariant } from '@/ui/button/components/Button';
|
||||
import {
|
||||
ConfirmationModal,
|
||||
StyledConfirmationButton,
|
||||
} from '@/ui/modal/components/ConfirmationModal';
|
||||
import { Button } from '@/ui/button/components/Button';
|
||||
import { ConfirmationModal } from '@/ui/modal/components/ConfirmationModal';
|
||||
import { H2Title } from '@/ui/typography/components/H2Title';
|
||||
import { useDeleteUserAccountMutation } from '~/generated/graphql';
|
||||
|
||||
@ -40,9 +37,11 @@ export function DeleteAccount() {
|
||||
description="Delete account and all the associated data"
|
||||
/>
|
||||
|
||||
<StyledConfirmationButton
|
||||
<Button
|
||||
accent="danger"
|
||||
size="small"
|
||||
onClick={() => setIsDeleteAccountModalOpen(true)}
|
||||
variant={ButtonVariant.Secondary}
|
||||
variant="secondary"
|
||||
title="Delete account"
|
||||
/>
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ import { useRecoilValue } from 'recoil';
|
||||
import { useAuth } from '@/auth/hooks/useAuth';
|
||||
import { currentUserState } from '@/auth/states/currentUserState';
|
||||
import { AppPath } from '@/types/AppPath';
|
||||
import { ButtonVariant } from '@/ui/button/components/Button';
|
||||
import {
|
||||
ConfirmationModal,
|
||||
StyledConfirmationButton,
|
||||
@ -38,7 +37,7 @@ export function DeleteWorkspace() {
|
||||
<H2Title title="Danger zone" description="Delete your whole workspace" />
|
||||
<StyledConfirmationButton
|
||||
onClick={() => setIsDeleteWorkSpaceModalOpen(true)}
|
||||
variant={ButtonVariant.Secondary}
|
||||
variant="secondary"
|
||||
title="Delete workspace"
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user