#2620: MenuBadge.jsx
projectforge-webapp/src/components/base/navigation/categories-dropdown/MenuBadge.jsx React JSX Component (Menu Counter Badge), projectforge-webapp/src/components/base/navigation/categories-dropdown/MenuBadge.jsx 51 lines · 47 code · 0 comments · 4 blank
Reusable badge component for navigation menu counters (pending tasks, unread notifications, etc.). Renders a colored pill <span> with CSS classes from Navigation.module.scss: .badge (base pill styling), .isFlying (absolute-positioned animated variant with scale transform), color class (e.g. .danger for red). Unique DOM id via elementKey (menu-badge-{elementKey}) enables optional UncontrolledTooltip on hover. Children accepts string or number. Props: elementKey (required), color (danger default), isFlying (bool), tooltip (string). Imports: classnames, PropTypes, colorPropType, UncontrolledTooltip from design, SCSS module.
Git History
3685edd6c lift to react 18 wip
36bfe1dbe New react version, eslint reviewed by Fin.
c23bfbdf5 es-lint: review with Fin required.
38df08cbe renamed menu badge flying property
e698c3687 fix MenuBadge prop naming