@atlaskit/dropdown-menu
Version:
A dropdown menu displays a list of actions or options to a user.
33 lines (32 loc) • 1.01 kB
JavaScript
/* group-title.tsx generated by @compiled/babel-plugin v2.0.0 */
import "./group-title.compiled.css";
import { ax, ix } from "@compiled/react/runtime";
import React from 'react';
import { Box } from '@atlaskit/primitives/compiled';
var styles = {
heading: "_11c8i4vh _1rjcze3t _18zrpxbi _syazazsu"
};
/**
* __Group title__
*
* Used to visually represent the title for DropdownMenu groups.
*
* Pre-existing a11y note: uses `role="menuitem"` with `aria-hidden="true"`.
* WAI-ARIA APG recommends `role="presentation"` for non-interactive group
* headings, with the group linked via `aria-labelledby`. Out of scope for
* the top-layer migration — this is legacy behavior.
*
* @internal
*/
var GroupTitle = function GroupTitle(_ref) {
var id = _ref.id,
title = _ref.title;
return /*#__PURE__*/React.createElement(Box, {
"data-ds--menu--heading-item": true,
role: "menuitem",
id: id,
"aria-hidden": "true",
xcss: styles.heading
}, title);
};
export default GroupTitle;