UNPKG

@coveord/plasma-mantine

Version:

A Plasma flavoured Mantine theme

50 lines (49 loc) 1.69 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Collapse, Paper, polymorphicFactory, Stack, Text, Title, useProps, useStyles } from '@mantine/core'; import classes from './ChildForm.module.css'; const defaultProps = {}; export const ChildForm = polymorphicFactory((props, ref)=>{ const { className, children, style, classNames, styles, unstyled, vars, title, description, ...others } = useProps('ChildForm', defaultProps, props); const getStyles = useStyles({ name: 'ChildForm', classes, props, className, style, classNames, styles, unstyled, vars }); return /*#__PURE__*/ _jsx(Collapse, { ref: ref, ...others, ...getStyles('root'), children: /*#__PURE__*/ _jsxs(Paper, { bg: "gray.0", p: "md", ...getStyles('paper'), children: [ (title || description) && /*#__PURE__*/ _jsxs(Stack, { gap: 0, mb: "md", children: [ title && /*#__PURE__*/ _jsx(Title, { order: 5, children: title }), description && /*#__PURE__*/ _jsx(Text, { c: "gray.7", children: description }) ] }), /*#__PURE__*/ _jsx(Stack, { gap: "md", children: children }) ] }) }); }); //# sourceMappingURL=ChildForm.js.map