UNPKG

@atlaskit/dropdown-menu

Version:

A dropdown menu displays a list of actions or options to a user.

40 lines (39 loc) • 1.17 kB
/* group-title.tsx generated by @compiled/babel-plugin v3.0.4 */ import "./group-title.compiled.css"; import { ax, ix } from "@compiled/react/runtime"; import React from 'react'; import { cx } from '@atlaskit/css'; import { fg } from '@atlaskit/platform-feature-flags/fg'; import { Box } from '@atlaskit/primitives/compiled/box'; var styles = { heading: "_11c8i4vh _1rjcze3t _18zrpxbi _syazazsu", newHeading: "_11c8wadc _syaz1rpy _1q5112x7 _85i51b66 _bozgu2gc _y4tiv47k" }; var semanticStyles = { heading: "_1rjcze3t _18zrbwzm" }; /** * __Group title__ * * Used to visually represent the title for DropdownMenu groups. * * @internal */ var GroupTitle = function GroupTitle(_ref) { var id = _ref.id, title = _ref.title; if (fg('platform-dst-new-menu')) { return /*#__PURE__*/React.createElement(Box, { id: id, xcss: styles.newHeading }, title); } return /*#__PURE__*/React.createElement(Box, { "data-ds--menu--heading-item": true, role: "menuitem", id: id, "aria-hidden": "true", xcss: cx(styles.heading, fg('platform-semantic-spacing') && semanticStyles.heading) }, title); }; export default GroupTitle;