UNPKG

@itwin/itwinui-react

Version:

A react component library for iTwinUI

33 lines (32 loc) 744 B
import * as React from 'react'; import { Box } from '../../utils/index.js'; import cx from 'classnames'; export const NotificationMarker = React.forwardRef((props, ref) => { let { className, children, status = 'primary', pulsing = false, enabled = true, ...rest } = props; return React.createElement( Box, { as: 'span', ref: ref, className: cx( { 'iui-notification-marker': enabled, }, className, ), 'data-iui-variant': enabled ? status : null, 'data-iui-urgent': enabled ? pulsing : null, ...rest, }, children, ); }); if ('development' === process.env.NODE_ENV) NotificationMarker.displayName = 'NotificationMarker';