@fluentui/react-northstar
Version:
A themable React component library.
57 lines (55 loc) • 1.54 kB
JavaScript
exports.__esModule = true;
exports.formFieldStyles = void 0;
var _utils = require("../../../../utils");
var formFieldStyles = {
root: function root(_ref) {
var props = _ref.props,
variables = _ref.variables;
return {};
},
label: function label(_ref2) {
var props = _ref2.props;
var type = props.type,
inline = props.inline,
required = props.required;
return Object.assign({}, (!type || type !== 'radio' && type !== 'checkbox') && {
display: 'block',
marginBottom: (0, _utils.pxToRem)(4)
}, inline && {
marginRight: (0, _utils.pxToRem)(10),
display: 'inline'
}, required && {
'::after': {
content: '"*"'
}
});
},
control: function control(_ref3) {
var props = _ref3.props,
v = _ref3.variables;
var type = props.type;
return Object.assign({}, type && (type === 'radio' || type === 'checkbox') && {
marginRight: (0, _utils.pxToRem)(10)
});
},
message: function message(_ref4) {
var p = _ref4.props,
v = _ref4.variables;
return Object.assign({}, p.hasErrorMessage && {
color: v.colorScheme.red.foreground
}, {
display: 'block',
paddingLeft: v.messagePaddingLeft
});
},
icon: function icon(_ref5) {
var p = _ref5.props,
v = _ref5.variables;
return Object.assign({}, p.hasErrorMessage && {
color: v.colorScheme.red.foreground
});
}
};
exports.formFieldStyles = formFieldStyles;
//# sourceMappingURL=formFieldStyles.js.map
;