@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
1 lines • 2.44 kB
Source Map (JSON)
{"version":3,"file":"AppShellFooter.cjs","names":["factory","useProps","useAppShellContext","Box","RemoveScroll","classes"],"sources":["../../../../src/components/AppShell/AppShellFooter/AppShellFooter.tsx"],"sourcesContent":["import cx from 'clsx';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n StylesApiProps,\n useProps,\n} from '../../../core';\nimport { useAppShellContext } from '../AppShell.context';\nimport { AppShellCompoundProps } from '../AppShell.types';\nimport classes from '../AppShell.module.css';\n\nexport type AppShellFooterStylesNames = 'footer';\n\nexport interface AppShellFooterProps\n extends\n BoxProps,\n AppShellCompoundProps,\n StylesApiProps<AppShellFooterFactory>,\n ElementProps<'footer'> {}\n\nexport type AppShellFooterFactory = Factory<{\n props: AppShellFooterProps;\n ref: HTMLElement;\n stylesNames: AppShellFooterStylesNames;\n}>;\n\nexport const AppShellFooter = factory<AppShellFooterFactory>((_props) => {\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n withBorder,\n zIndex,\n mod,\n ...others\n } = useProps('AppShellFooter', null, _props);\n\n const ctx = useAppShellContext();\n\n if (ctx.disabled) {\n return null;\n }\n\n return (\n <Box\n component=\"footer\"\n mod={[{ 'with-border': withBorder ?? ctx.withBorder }, mod]}\n {...ctx.getStyles('footer', {\n className: cx({ [RemoveScroll.classNames.zeroRight]: ctx.offsetScrollbars }, className),\n classNames,\n styles,\n style,\n })}\n {...others}\n __vars={{ '--app-shell-footer-z-index': (zIndex ?? ctx.zIndex)?.toString() }}\n />\n );\n});\n\nAppShellFooter.classes = classes;\nAppShellFooter.displayName = '@mantine/core/AppShellFooter';\n"],"mappings":";;;;;;;;;;;;AA8BA,MAAa,iBAAiBA,gBAAAA,SAAgC,WAAW;CACvE,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,YACA,QACA,KACA,GAAG,WACDC,kBAAAA,SAAS,kBAAkB,MAAM,OAAO;CAE5C,MAAM,MAAMC,yBAAAA,oBAAoB;AAEhC,KAAI,IAAI,SACN,QAAO;AAGT,QACE,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;EACE,WAAU;EACV,KAAK,CAAC,EAAE,eAAe,cAAc,IAAI,YAAY,EAAE,IAAI;EAC3D,GAAI,IAAI,UAAU,UAAU;GAC1B,YAAA,GAAA,KAAA,SAAc,GAAGC,oBAAAA,aAAa,WAAW,YAAY,IAAI,kBAAkB,EAAE,UAAU;GACvF;GACA;GACA;GACD,CAAC;EACF,GAAI;EACJ,QAAQ,EAAE,+BAA+B,UAAU,IAAI,SAAS,UAAU,EAAE;EAC5E,CAAA;EAEJ;AAEF,eAAe,UAAUC,wBAAAA;AACzB,eAAe,cAAc"}