Skip to content

Commit

Permalink
delete modal from controlled.tsx
Browse files Browse the repository at this point in the history
Refs: #6899
  • Loading branch information
anicyne committed Jan 20, 2025
1 parent 2a03daa commit 81a57a3
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/samples/react/src/components/drawer/controlled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const DrawerControlled: FC = () => {
const defaultAlign = searchParams.get('align') as AlignPropType;
const hideMenus = useContext(HideMenusContext);
const [open, setOpen] = useState(false);
const [modalOpen, setModalOpen] = useState(false);
const [align, setAlign] = useState<AlignPropType>(defaultAlign || 'left');
return (
<div>
Expand All @@ -34,13 +33,6 @@ export const DrawerControlled: FC = () => {
</div>
</KolDrawer>
<KolButton _label="Open drawer" _on={{ onClick: () => setOpen(true) }} />
<KolDrawer _open={modalOpen} _align={align} _label="I'm a controlled modal drawer" _on={{ onClose: () => setModalOpen(false) }}>
<div>
<p>Lorem ipsum dolor sit amet,</p>
<KolButton _label="Close drawer" _on={{ onClick: () => setModalOpen(false) }} />
</div>
</KolDrawer>
<KolButton _label="Open drawer as modal" _on={{ onClick: () => setModalOpen(true) }} />
</div>
</div>
);
Expand Down

0 comments on commit 81a57a3

Please sign in to comment.