UNPKG

baseui

Version:

A React Component library implementing the Base design language

94 lines (91 loc) 2.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Root = exports.NavigationList = exports.NavigationItem = void 0; var _styles = require("../styles"); var _constants = require("./constants"); /* Copyright (c) Uber Technologies, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. */ const Root = exports.Root = (0, _styles.styled)('nav', props => { const { $theme } = props; const { sizing: { scale500 }, typography: { font300 }, colors: { borderOpaque } } = $theme; return { ...font300, display: 'flex', paddingBottom: scale500, paddingTop: scale500, borderBottomWidth: '1px', borderBottomStyle: 'solid', borderBottomColor: `${borderOpaque}`, backgroundColor: $theme.colors.backgroundPrimary }; }); Root.displayName = "Root"; Root.displayName = 'Root'; const NavigationItem = exports.NavigationItem = (0, _styles.styled)('li', props => { const { $theme } = props; const { sizing: { scale800 } } = $theme; return { alignSelf: 'center', paddingLeft: scale800 }; }); NavigationItem.displayName = "NavigationItem"; NavigationItem.displayName = 'NavigationItem'; const NavigationList = exports.NavigationList = (0, _styles.styled)('ul', props => { const { $align, $theme } = props; const aligned = $align === _constants.ALIGN.right || $align === _constants.ALIGN.left; const { sizing: { scale800 } } = $theme; return { display: 'flex', ':first-child': { padding: 0 }, ':last-child': { padding: 0 }, flexGrow: aligned ? 0 : 1, flexShrink: aligned ? 0 : 1, flexBasis: aligned ? 'auto' : '0%', paddingLeft: scale800, paddingRight: scale800, justifySelf: $align, justifyContent: $align, listStyle: 'none', marginBottom: 0, marginTop: 0, marginLeft: 0, marginRight: 0 }; }); NavigationList.displayName = "NavigationList"; NavigationList.displayName = 'NavigationList';