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:
Harshit Singh
2024-08-31 20:10:38 +05:30
committed by GitHub
parent cd66ea74a2
commit c5572f1b1e

View File

@ -1,15 +1,12 @@
import { useState } from 'react';
import { useRecoilValue } from 'recoil';
import { H2Title } from 'twenty-ui';
import { H2Title, IconTrash } from 'twenty-ui';
import { useAuth } from '@/auth/hooks/useAuth';
import { currentUserState } from '@/auth/states/currentUserState';
import {
ConfirmationModal,
StyledConfirmationButton,
} from '@/ui/layout/modal/components/ConfirmationModal';
import { ConfirmationModal } from '@/ui/layout/modal/components/ConfirmationModal';
import { useDeleteCurrentWorkspaceMutation } from '~/generated/graphql';
import { Button } from '@/ui/input/button/components/Button';
export const DeleteWorkspace = () => {
const [isDeleteWorkSpaceModalOpen, setIsDeleteWorkSpaceModalOpen] =
useState(false);
@ -28,10 +25,12 @@ export const DeleteWorkspace = () => {
return (
<>
<H2Title title="Danger zone" description="Delete your whole workspace" />
<StyledConfirmationButton
onClick={() => setIsDeleteWorkSpaceModalOpen(true)}
<Button
accent="danger"
variant="secondary"
title="Delete workspace"
Icon={IconTrash}
onClick={() => setIsDeleteWorkSpaceModalOpen(true)}
/>
<ConfirmationModal