API Reference
Header of the Modal
function Example() { const [open, setOpen] = React.useState(false); return ( <> <Button onClick={() => setOpen(true)}>Open modal</Button> <Modal open={open} onClose={() => { setOpen(false); }} > <ModalHeader> <ModalHeading>Heading</ModalHeading> <ModalDismiss /> </ModalHeader> </Modal> </> ); }
Parameters
props
- Type:
typescript.Omit<@types/react.React.DetailedHTMLProps<@types/react.React.HTMLAttributes<typescript.HTMLHeadingElement>, typescript.HTMLHeadingElement>, ref> & typescript.Pick<@vtex/shoreline-components.HeadingProps, variant> & @types/react.React.RefAttributes<typescript.HTMLHeadingElement>
Props
ModalHeadingProps
- Type:
@types/react.React.ComponentPropsWithoutRef<h1> & typescript.Pick<@vtex/shoreline-components.HeadingProps, variant>