[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:
parent
33d6a8d233
commit
56331a7b55
7 changed files with 69 additions and 51 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue