UNPKG

2.95 kBJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.NavigationList = exports.NavigationItem = exports.Root = void 0;
7
8var _index = require("../styles/index.js");
9
10var _constants = require("./constants.js");
11
12function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
13
14function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
15
16function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
18var Root = (0, _index.styled)('nav', function (props) {
19 var $theme = props.$theme;
20 var scale500 = $theme.sizing.scale500,
21 font300 = $theme.typography.font300,
22 border = $theme.colors.border;
23 return _objectSpread({}, font300, {
24 display: 'flex',
25 paddingBottom: scale500,
26 paddingTop: scale500,
27 borderBottomWidth: '1px',
28 borderBottomStyle: 'solid',
29 borderBottomColor: "".concat(border),
30 backgroundColor: $theme.colors.headerNavigationFill
31 });
32});
33exports.Root = Root;
34Root.displayName = "Root";
35var NavigationItem = (0, _index.styled)('li', function (props) {
36 var $theme = props.$theme;
37 var scale800 = $theme.sizing.scale800;
38 return {
39 alignSelf: 'center',
40 paddingLeft: scale800
41 };
42});
43exports.NavigationItem = NavigationItem;
44NavigationItem.displayName = "NavigationItem";
45var NavigationList = (0, _index.styled)('ul', function (props) {
46 var $align = props.$align,
47 $theme = props.$theme;
48 var aligned = $align === _constants.ALIGN.right || $align === _constants.ALIGN.left;
49 var scale800 = $theme.sizing.scale800;
50 return {
51 display: 'flex',
52 ':first-child': {
53 padding: 0
54 },
55 ':last-child': {
56 padding: 0
57 },
58 flexGrow: aligned ? 0 : 1,
59 flexShrink: aligned ? 0 : 1,
60 flexBasis: aligned ? 'auto' : '0%',
61 paddingLeft: scale800,
62 paddingRight: scale800,
63 justifySelf: $align,
64 justifyContent: $align,
65 listStyle: 'none',
66 marginBottom: 0,
67 marginTop: 0,
68 marginLeft: 0,
69 marginRight: 0
70 };
71});
72exports.NavigationList = NavigationList;
73NavigationList.displayName = "NavigationList";
\No newline at end of file