@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
1 lines • 1.7 kB
Source Map (JSON)
{"version":3,"file":"DrawerCloseButton.cjs","names":["factory","useProps","ModalBaseCloseButton","useDrawerContext","classes"],"sources":["../../../src/components/Drawer/DrawerCloseButton.tsx"],"sourcesContent":["import { CompoundStylesApiProps, factory, Factory, useProps } from '../../core';\nimport { ModalBaseCloseButton, ModalBaseCloseButtonProps } from '../ModalBase';\nimport { useDrawerContext } from './Drawer.context';\nimport classes from './Drawer.module.css';\n\nexport type DrawerCloseButtonStylesNames = 'close';\n\nexport interface DrawerCloseButtonProps\n extends ModalBaseCloseButtonProps, CompoundStylesApiProps<DrawerCloseButtonFactory> {}\n\nexport type DrawerCloseButtonFactory = Factory<{\n props: DrawerCloseButtonProps;\n ref: HTMLButtonElement;\n stylesNames: DrawerCloseButtonStylesNames;\n compound: true;\n}>;\n\nexport const DrawerCloseButton = factory<DrawerCloseButtonFactory>((_props) => {\n const props = useProps('DrawerCloseButton', null, _props);\n const { classNames, className, style, styles, vars, ...others } = props;\n\n const ctx = useDrawerContext();\n\n return (\n <ModalBaseCloseButton\n {...ctx.getStyles('close', { classNames, style, styles, className })}\n {...others}\n />\n );\n});\n\nDrawerCloseButton.classes = classes;\nDrawerCloseButton.displayName = '@mantine/core/DrawerCloseButton';\n"],"mappings":";;;;;;;;;AAiBA,MAAa,oBAAoBA,gBAAAA,SAAmC,WAAW;CAE7E,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WADzCC,kBAAAA,SAAS,qBAAqB,MAAM,OAAO;AAKzD,QACE,iBAAA,GAAA,kBAAA,KAACC,6BAAAA,sBAAD;EACE,GAJQC,uBAAAA,kBAAkB,CAIlB,UAAU,SAAS;GAAE;GAAY;GAAO;GAAQ;GAAW,CAAC;EACpE,GAAI;EACJ,CAAA;EAEJ;AAEF,kBAAkB,UAAUC,sBAAAA;AAC5B,kBAAkB,cAAc"}