Dropdown-Menü-Avatar
Verwendung
Die Anwendungsrichtlinien für diese Komponente werden derzeit erarbeitet und sind in einer künftigen Version verfügbar.
Code
<DropdownMenuAvatar id="basicExample">
<DropdownMenuHeader title="Heading">
This is a header
</DropdownMenuHeader>
<DropdownMenuLink
onClick={() => {}}
to="/example"
>
First menu item (internal link)
</DropdownMenuLink>
<DropdownMenuSeparator />
<DropdownMenuLink
href="http://example.com"
onClick={() => {}}
>
Second menu item (external link)
</DropdownMenuLink>
</DropdownMenuAvatar>
Importanweisung
import { DropdownMenuAvatar } from '@jutro/components';
Komponentenvertrag
Vergewissern Sie sich, dass Sie die API-Oberfläche der Design System-Komponenten und die damit verbundenen Auswirkungen und Kompromisse verstehen. Erfahren Sie mehr in unserer Einführung zur Komponenten-API.
Eigenschaften
iderforderlich- Typ
stringBeschreibungThe identifier used for the drop-down menu component.
alignRight- Typ
boolBeschreibungIf set to
true, items are aligned to the right edge of the menu. authLinksClassName- Typ
stringBeschreibungAdditional CSS class for the drop-down menu avatar authentication links.
autoFocus- Typ
boolBeschreibungIf set to
true, the first menu item gets focused after opening the drop-down menu. children- Typ
nodeBeschreibungThe component children, wrapped by the drop-down menu avatar component. This can include DropdownMenu components.
className- Typ
stringBeschreibungAdditional component styling class name which is passed to the component.
dropdownClassName- Typ
stringBeschreibungOptional CSS class for the drop-down menu.
dropUp- Typ
boolBeschreibungIf set to
true, the menu appears above the trigger component. headerClassName- Typ
stringBeschreibungAdditional CSS class for the drop-down menu avatar header.
icon- Typ
string | IconBeschreibungAn Icon component to render on the component. The value must be an
Iconcomponent or the icon's name. For example,CheckIconor'gw-check'. imageSource- Typ
stringBeschreibungThe path to a user image, preferentially shown before user initials or icon.
isOpen- Typ
boolBeschreibungIf set to
true, the menu is currently visible to the user. messageProps- Beschreibung
The message props to generate an error message or aria-label.
onBeforeLogout