@fluentui/react-northstar
Version:
A themable React component library.
52 lines (51 loc) • 1.39 kB
JavaScript
import { pxToRem } from '../../../../utils';
export 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: pxToRem(4)
}, inline && {
marginRight: 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: 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
});
}
};
//# sourceMappingURL=formFieldStyles.js.map