UNPKG

@primer/components

Version:
26 lines (24 loc) 673 B
import React from 'react'; import Box from '../Box'; import { get } from '../constants'; import { merge } from '../sx'; /** * Visually separates `Item`s or `Group`s in an `ActionList`. */ export const Divider = ({ sx = {} }) => { return /*#__PURE__*/React.createElement(Box, { as: "li", role: "separator", sx: merge({ height: 1, backgroundColor: 'actionListItem.inlineDivider', marginTop: theme => `calc(${get('space.2')(theme)} - 1px)`, marginBottom: 2, listStyle: 'none' // hide the ::marker inserted by browser's stylesheet }, sx), "data-component": "ActionList.Divider" }); }; Divider.displayName = "Divider";