UNPKG

@coveord/plasma-mantine

Version:

A Plasma flavoured Mantine theme

69 lines (68 loc) 2.43 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Radio, Stack, Tooltip, factory, useProps, useStyles } from '@mantine/core'; import classes from '../../styles/RadioCard.module.css'; import { Input } from '../Input/Input'; const defaultProps = {}; export const RadioCard = factory((_props, ref)=>{ const { children, classNames, styles, style, className, vars, disabled, label, description, disabledTooltip, ...others } = useProps('RadioCard', defaultProps, _props); const getStyles = useStyles({ name: 'RadioCard', classes, vars, classNames, className, style, props: _props, styles }); return /*#__PURE__*/ _jsx(Tooltip, { label: disabledTooltip, disabled: !disabled || !disabledTooltip, children: /*#__PURE__*/ _jsxs(Radio.Card, { ref: ref, disabled: disabled, readOnly: _props.readOnly, ...getStyles('card', { className, style, classNames, styles }), ...others, children: [ /*#__PURE__*/ _jsx(Radio.Indicator, { disabled: disabled, ...getStyles('indicator', { classNames, styles }) }), /*#__PURE__*/ _jsxs(Stack, { ...getStyles('container', { classNames, styles }), children: [ /*#__PURE__*/ _jsx(Input.Label, { ...getStyles('title', { classNames, styles }), children: label }), description && /*#__PURE__*/ _jsx(Input.Description, { ...getStyles('description', { classNames, styles }), children: description }), children ] }) ] }) }); }); RadioCard.displayName = 'RadioCard'; //# sourceMappingURL=RadioCard.js.map