@atlaskit/navigation-system
Version:
The latest navigation system for Atlassian apps.
27 lines • 900 B
JavaScript
/* badge-container.tsx generated by @compiled/babel-plugin v3.0.2 */
import "./badge-container.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
const styles = {
root: "_kqswh2mm _1e0c1txw",
badgeContainer: "_kqswstnw _o5721q9c _152tr5cr _1e02utpp _lcxvglyw"
};
/**
* __Badge container__
*
* Adds a badge to the top right corner of the child element.
* Example of usage is showing the number of notifications in the top navigation bar.
*/
export const BadgeContainer = ({
children,
id: badgeId,
badge: Badge,
isListItem = true
}) => /*#__PURE__*/React.createElement("div", {
role: isListItem ? 'listitem' : undefined,
className: ax([styles.root])
}, children, /*#__PURE__*/React.createElement("div", {
id: badgeId,
"aria-hidden": true,
className: ax([styles.badgeContainer])
}, /*#__PURE__*/React.createElement(Badge, null)));