UNPKG

@navinc/base-react-components

Version:
40 lines 1.53 kB
var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; import { jsx as _jsx } from "react/jsx-runtime"; import propTypes from 'prop-types'; import styled from 'styled-components'; import { defaultSize, getFromSize } from './copy'; export const ListItem = styled.li ` color: ${({ light, theme }) => (light ? theme.neutral400 : theme.neutral500)}; font-family: postgrotesk, Roboto, Helvetica, sans-serif; font-size: ${getFromSize('fontSize')}; font-weight: ${({ bold }) => (bold ? 'bold' : 'normal')}; line-height: ${getFromSize('lineHeight')}; `; ListItem.displayName = 'ListItem'; ListItem.propTypes = { bold: propTypes.bool, light: propTypes.bool, size: propTypes.string, }; ListItem.defaultProps = { size: defaultSize, }; export const List = (_a) => { var { element = 'ul', children } = _a, rest = __rest(_a, ["element", "children"]); const HTMLElement = element; return (_jsx(HTMLElement, Object.assign({ element: element }, rest, { children: children }), void 0)); }; List.propTypes = { element: propTypes.string, }; //# sourceMappingURL=list.js.map