UNPKG

@ui5/webcomponents-react

Version:

React Wrapper for UI5 Web Components and additional components

30 lines (29 loc) 1.02 kB
'use client'; import { withWebComponent } from '@ui5/webcomponents-react-base'; /** * The `AvatarBadge` component is used to display a badge on top of `Avatar` component. * The badge can display an icon and supports different states for visual affordance. * * ### Usage * * The badge should be used as a child element of `Avatar` in the `badge` slot. * * ```html * <Avatar> * <AvatarBadge icon="edit" slot="badge"></AvatarBadge> * </Avatar> * ``` * * ### Keyboard Handling * * The badge does not receive keyboard focus. * * * * __Note:__ This is a UI5 Web Component! [AvatarBadge UI5 Web Component Documentation](https://ui5.github.io/webcomponents/components/AvatarBadge) | [Repository](https://github.com/UI5/webcomponents) * * @since [2.19.0](https://github.com/UI5/webcomponents/releases/tag/v2.19.0) of __@ui5/webcomponents__. */ const AvatarBadge = withWebComponent('ui5-avatar-badge', ['icon', 'state', 'tooltip'], [], [], []); AvatarBadge.displayName = 'AvatarBadge'; export { AvatarBadge };