I am using the example from the website
import { Button, ButtonText } from '@/components/ui/button';
import {
Drawer,
DrawerBackdrop,
DrawerBody,
DrawerCloseButton,
DrawerContent,
DrawerFooter,
DrawerHeader,
} from '@/components/ui/drawer';
import { Heading } from '@/components/ui/heading';
import { CloseIcon, Icon } from '@/components/ui/icon';
import { Text } from '@/components/ui/text';
import { useState } from 'react';
export default function Home() {
const [showDrawer, setShowDrawer] = useState(false);
return (
<>
<Button
className='mt-24'
onPress={() => {
setShowDrawer(true);
}}
>
<ButtonText>Open Drawer</ButtonText>
</Button>
<Drawer
isOpen={showDrawer}
size="sm"
anchor="left"
onClose={() => {
setShowDrawer(false);
}}
>
<DrawerBackdrop />
<DrawerContent>
<DrawerHeader>
<Heading size="lg">Menu</Heading>
<DrawerCloseButton>
<Icon as={CloseIcon} />
</DrawerCloseButton>
</DrawerHeader>
<DrawerBody>
<Text>This is the basic drawer component.</Text>
</DrawerBody>
<DrawerFooter>
<Button
variant="outline"
onPress={() => {
setShowDrawer(false);
}}
>
<ButtonText>Cancel</ButtonText>
</Button>
</DrawerFooter>
</DrawerContent>
</Drawer>
</>
);
}
But on it does not works as expected, it glitches out as show below