@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
1 lines • 1.18 kB
Source Map (JSON)
{"version":3,"file":"Footer.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Footer.ts"],"names":[],"mappings":";;;AACA,gDAAmD;AAWnD,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;;;GAWG;AACU,QAAA,MAAM,GAAG,IAAA,+BAAmB,EAA2B,IAAI,CAAC,CAAC","sourcesContent":["import type { ButtonElement } from './form';\nimport { createSnapComponent } from '../component';\n\n/**\n * The props of the {@link Footer} component.\n *\n * @property children - The single or multiple buttons in the footer.\n */\nexport type FooterProps = {\n children: ButtonElement | [ButtonElement, ButtonElement];\n};\n\nconst TYPE = 'Footer';\n\n/**\n * A footer component, which is used to create a footer with buttons.\n *\n * @param props - The props of the component.\n * @param props.children - The single or multiple buttons in the footer.\n * @returns A footer element.\n * @example\n * <Footer>\n * <Button name=\"cancel\">Cancel</Button>\n * <Button name=\"confirm\">Confirm</Button>\n * </Footer>\n */\nexport const Footer = createSnapComponent<FooterProps, typeof TYPE>(TYPE);\n\n/**\n * A footer element.\n *\n * @see Footer\n */\nexport type FooterElement = ReturnType<typeof Footer>;\n"]}