import React from 'react' import { Box } from '../../atoms/box/index.js' import { Button } from '../../atoms/button/index.js' import { Icon } from '../../atoms/icon/index.js' import { SmallText, Title } from '../../atoms/typography/index.js' import { DropDown, DropDownItem, DropDownMenu, DropDownTrigger } from '../../molecules/drop-down/index.js' import { CurrentUserNavProps } from './current-user-nav-props.js' import StyledCurrentUserNav from './current-user-nav-styled.js' import { Avatar } from '../../atoms/avatar/index.js' /** * @load ./current-user-nav.doc.md * @component * @subcategory Organisms * @hideconstructor * @see CurrentUserNavProps * @see {@link https://storybook.adminjs.co/?path=/story/designsystem-organisms-current-user-nav--default Storybook} * @new In version 3.3 * @section design-system */ export const CurrentUserNav: React.FC = (props) => { const { name = '', title = '', avatarUrl, dropActions, lineActions } = props return ( {lineActions && lineActions.length && ( {lineActions.map((action) => ( ))} )} {name} {title && {title}} {name.slice(0, 1).toUpperCase()} {dropActions && dropActions.length && ( {dropActions.map((action) => ( {action.icon && } {action.label} ))} )} ) } CurrentUserNav.displayName = 'CurrentUserNav' export default CurrentUserNav