[WEB-1949] chore: delete workspace components restructuring. (#5123)

* [WEB-1949] chore: delete workspace components restructuring.

* chore: update delete workspace section.
This commit is contained in:
Prateek Shourya 2024-07-15 16:55:26 +05:30 committed by GitHub
parent 33d6a8d233
commit 56331a7b55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 69 additions and 51 deletions

View file

@ -4,6 +4,7 @@ import { Disclosure, Transition } from "@headlessui/react";
export type TCollapsibleProps = {
title: string | React.ReactNode;
children: React.ReactNode;
className?: string;
buttonClassName?: string;
isOpen?: boolean;
onToggle?: () => void;
@ -11,7 +12,7 @@ export type TCollapsibleProps = {
};
export const Collapsible: FC<TCollapsibleProps> = (props) => {
const { title, children, buttonClassName, isOpen, onToggle, defaultOpen } = props;
const { title, children, className, buttonClassName, isOpen, onToggle, defaultOpen } = props;
// state
const [localIsOpen, setLocalIsOpen] = useState<boolean>(isOpen || defaultOpen ? true : false);
@ -31,7 +32,7 @@ export const Collapsible: FC<TCollapsibleProps> = (props) => {
}, [isOpen, onToggle]);
return (
<Disclosure>
<Disclosure as="div" className={className}>
<Disclosure.Button className={buttonClassName} onClick={handleOnClick}>
{title}
</Disclosure.Button>

View file

@ -13,7 +13,7 @@ export type TModalVariant = "danger" | "primary";
type Props = {
content: React.ReactNode | string;
handleClose: () => void;
handleSubmit: () => Promise<void>;
handleSubmit: () => void;
hideIcon?: boolean;
isSubmitting: boolean;
isOpen: boolean;