@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
25 lines • 1.14 kB
JavaScript
import { createSnapComponent } from "../component.mjs";
const TYPE = 'CollapsibleSection';
/**
* A collapsible section component, which is used to group multiple components
* together with a label. The section can be expanded or collapsed by the user.
*
* @param props - The props of the component.
* @param props.children - The children of the collapsible section.
* @param props.label - The label of the collapsible section.
* @param props.direction - The direction that the children are aligned.
* @param props.alignment - The alignment of the children (a justify-content value).
* @returns A collapsible section element.
* @example
* <CollapsibleSection label="Transaction details">
* <Row label="From">
* <Address address="0x1234567890123456789012345678901234567890" />
* </Row>
* <Row label="To" variant="warning" tooltip="This address has been deemed dangerous.">
* <Address address="0x0000000000000000000000000000000000000000" />
* </Row>
* </CollapsibleSection>
* @category Components
*/
export const CollapsibleSection = createSnapComponent(TYPE);
//# sourceMappingURL=CollapsibleSection.mjs.map