UNPKG

@ui5/webcomponents-react

Version:

React Wrapper for UI5 Web Components and additional components

23 lines (22 loc) 1.19 kB
'use client'; import '@ui5/webcomponents/dist/Avatar.js'; import { withWebComponent } from '@ui5/webcomponents-react-base'; /** * An image-like component that has different display options for representing images and icons * in different shapes and sizes, depending on the use case. * * The shape can be circular or square. There are several predefined sizes, as well as an option to * set a custom size. * * ### Keyboard Handling * * - [Space] / [Enter] or [Return] - Fires the `click` event if the `mode` is set to `Interactive` or the deprecated `interactive` property is set to true. * - [Shift] - If [Space] is pressed, pressing [Shift] releases the component without triggering the click event. * * * * __Note:__ This is a UI5 Web Component! [Avatar UI5 Web Component Documentation](https://ui5.github.io/webcomponents/components/Avatar) | [Repository](https://github.com/UI5/webcomponents) */ const Avatar = withWebComponent('ui5-avatar', ['accessibilityAttributes', 'accessibleName', 'colorScheme', 'fallbackIcon', 'icon', 'initials', 'mode', 'shape', 'size'], ['disabled', 'interactive'], ['badge'], ['click']); Avatar.displayName = 'Avatar'; export { Avatar };