UNPKG

@fluentui/react-northstar

Version:
51 lines (50 loc) 1.7 kB
import { pxToRem } from '../../../../utils'; import { getColorScheme } from '../../colors'; export var menuStyles = { root: function root(_ref) { var p = _ref.props, v = _ref.variables, theme = _ref.theme; var iconOnly = p.iconOnly, fluid = p.fluid, pointing = p.pointing, pills = p.pills, primary = p.primary, underlined = p.underlined, vertical = p.vertical, submenu = p.submenu; var colors = getColorScheme(v.colorScheme, null, primary); var siteVariables = theme.siteVariables; return Object.assign({ display: 'flex', minHeight: pxToRem(24), margin: 0, padding: 0, color: v.color, backgroundColor: v.backgroundColor || 'inherit', listStyleType: 'none' }, iconOnly && { alignItems: 'center' }, vertical && Object.assign({ flexDirection: 'column', backgroundColor: v.verticalBackgroundColor, padding: pxToRem(8) + " " + pxToRem(4) }, submenu && { boxShadow: v.verticalBoxShadow }, !fluid && !submenu && { width: 'fit-content' }, iconOnly && { display: 'inline-block', width: 'auto' }), !pills && !iconOnly && !(pointing && vertical) && !underlined && Object.assign({ // primary has hardcoded grey border color border: v.borderWidth + " solid " + (primary ? v.primaryBorderColor : v.borderColor || colors.border), borderRadius: siteVariables.borderRadiusMedium }, submenu && { borderColor: v.subMenuBorderColor }), underlined && { borderBottom: v.underlinedBottomBorderWidth + " solid " + v.underlinedBorderColor }); } }; //# sourceMappingURL=menuStyles.js.map