import type { NextPage } from 'next' import { useEffect, useState } from 'react' import Button from '../../docs/fixtures/Button' import Code from '../../docs/fixtures/Code' import Container from '../../docs/fixtures/Container' import Expandable from '../../docs/fixtures/Expandable' import Kbd from '../../docs/fixtures/Kbd' import SheetContent from '../../docs/fixtures/SheetContent' import { simple } from '../../docs/headings' import MetaTags from '../../docs/MetaTags' import { BottomSheet } from '../../src' import type { GetStaticProps } from '../_app' export { getStaticProps } from '../_app' const SimpleFixturePage: NextPage = ({ description, homepage, meta, name, }) => { const [open, setOpen] = useState(false) // Ensure it animates in when loaded useEffect(() => { setOpen(true) }, []) function onDismiss() { setOpen(false) } return ( <> minHeight} >

Using onDismiss lets users close the sheet by swiping it down, tapping on the backdrop or by hitting esc on their keyboard.

The height adjustment is done automatically, it just works™!

) } export default SimpleFixturePage