yarn add @twilio-paste/disclosure - or - yarn add @twilio-paste/core
import {Disclosure, DisclosureHeading, DisclosureContent} from '@twilio-paste/core/disclosure';
const PopoverExample: React.FC = () => {
return (
<Disclosure>
<DisclosureHeading as="h2" variant="heading20">
Disclosure Heading
</DisclosureHeading>
<DisclosureContent>Disclosure content</DisclosureContent>
</Disclosure>
);
};
element
Overrides the default element name to apply unique styles with the Customization Provider
- Type
any
- Default
'DISCLOSURE'
state
Provide the Disclosure state returned from useDisclosureState
if you want to control the state of the Disclosure.
- Type
DisclosureStateReturn
variant
Changes the styling on the component based on the variant selected.
- Type
DisclosureVariants
- Default
'default'
Inherited props
Paste components will often extend native HTML elements and as a result will inherit or extend their available properties. Below is a list of the props this component has inherited and are also available to use.
as
- Type
any
element
Overrides the default element name to apply unique styles with the Customization Provider
- Type
any
- Default
'DISCLOSURE_HEADING'
marginBottom
- Type
any
variant
- Type
any
Inherited props
Paste components will often extend native HTML elements and as a result will inherit or extend their available properties. Below is a list of the props this component has inherited and are also available to use.
element
Overrides the default element name to apply unique styles with the Customization Provider
- Type
any
- Default
'DISCLOSURE_CONTENT'
Inherited props
Paste components will often extend native HTML elements and as a result will inherit or extend their available properties. Below is a list of the props this component has inherited and are also available to use.
Inherited props
Paste components will often extend native HTML elements and as a result will inherit or extend their available properties. Below is a list of the props this component has inherited and are also available to use.