fix: Deactivate & Activate icons should be swapped UI improvements (#6796)
## Fix This fixes the minor UI issue #6795 in which it addressed the following two problems- 1. Fixed the Icon switch 2. Updated the Delete Modal ## Screenshots <img width="314" alt="Screenshot 2024-08-30 at 1 38 31 AM" src="https://github.com/user-attachments/assets/2a3e2363-6c0e-493e-825a-5a84121ccc3d"> <img width="168" alt="Screenshot 2024-08-30 at 1 39 13 AM" src="https://github.com/user-attachments/assets/51b48b85-070f-4656-a42d-31db0baebca3"> <img width="182" alt="Screenshot 2024-08-30 at 1 39 23 AM" src="https://github.com/user-attachments/assets/6ac958eb-34eb-44b8-a588-30813a567f3e">
This commit is contained in:
@ -1,15 +1,12 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { useRecoilValue } from 'recoil';
|
import { useRecoilValue } from 'recoil';
|
||||||
import { H2Title } from 'twenty-ui';
|
import { H2Title, IconTrash } from 'twenty-ui';
|
||||||
|
|
||||||
import { useAuth } from '@/auth/hooks/useAuth';
|
import { useAuth } from '@/auth/hooks/useAuth';
|
||||||
import { currentUserState } from '@/auth/states/currentUserState';
|
import { currentUserState } from '@/auth/states/currentUserState';
|
||||||
import {
|
import { ConfirmationModal } from '@/ui/layout/modal/components/ConfirmationModal';
|
||||||
ConfirmationModal,
|
|
||||||
StyledConfirmationButton,
|
|
||||||
} from '@/ui/layout/modal/components/ConfirmationModal';
|
|
||||||
import { useDeleteCurrentWorkspaceMutation } from '~/generated/graphql';
|
import { useDeleteCurrentWorkspaceMutation } from '~/generated/graphql';
|
||||||
|
import { Button } from '@/ui/input/button/components/Button';
|
||||||
export const DeleteWorkspace = () => {
|
export const DeleteWorkspace = () => {
|
||||||
const [isDeleteWorkSpaceModalOpen, setIsDeleteWorkSpaceModalOpen] =
|
const [isDeleteWorkSpaceModalOpen, setIsDeleteWorkSpaceModalOpen] =
|
||||||
useState(false);
|
useState(false);
|
||||||
@ -28,10 +25,12 @@ export const DeleteWorkspace = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<H2Title title="Danger zone" description="Delete your whole workspace" />
|
<H2Title title="Danger zone" description="Delete your whole workspace" />
|
||||||
<StyledConfirmationButton
|
<Button
|
||||||
onClick={() => setIsDeleteWorkSpaceModalOpen(true)}
|
accent="danger"
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
title="Delete workspace"
|
title="Delete workspace"
|
||||||
|
Icon={IconTrash}
|
||||||
|
onClick={() => setIsDeleteWorkSpaceModalOpen(true)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ConfirmationModal
|
<ConfirmationModal
|
||||||
|
|||||||
Reference in New Issue
Block a user