@ui5/webcomponents-react
Version:
React Wrapper for UI5 Web Components and additional components
31 lines (30 loc) • 1.07 kB
JavaScript
'use client';
import '@ui5/webcomponents/dist/AvatarBadge.js';
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 };