UNPKG

@primer/components

Version:
40 lines (29 loc) 1.3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Divider = Divider; exports.StyledDivider = void 0; var _react = _interopRequireDefault(require("react")); var _styledComponents = _interopRequireDefault(require("styled-components")); var _constants = require("../constants"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const StyledDivider = _styledComponents.default.div.withConfig({ displayName: "Divider__StyledDivider", componentId: "sc-42656i-0" })(["height:1px;background:", ";margin-top:calc(", " - 1px);margin-bottom:", ";"], (0, _constants.get)('colors.border.muted'), (0, _constants.get)('space.2'), (0, _constants.get)('space.2')); /** * Visually separates `Item`s or `Group`s in an `ActionList`. */ exports.StyledDivider = StyledDivider; function Divider() { return /*#__PURE__*/_react.default.createElement(StyledDivider, null); } Divider.displayName = "Divider"; /** * `Divider` fulfills the `ItemPropsWithCustomRenderer` contract, * so it can be used inline in an `ActionList`’s `items` prop. * In other words, `items={[ActionList.Divider]}` is supported as a concise * alternative to `items={[{renderItem: () => <ActionList.Divider />}]}`. */ Divider.renderItem = Divider;