import React from 'react'
import styled from 'styled-components'
import { Box } from '../atoms/box/box'
import { DropDown, DropDownTrigger, DropDownMenu } from './drop-down/index'
import { Text } from '../atoms/text'
import { Icon } from '../atoms/icon'
const height = '46px'
const LoggedUserInfo = styled(Box)`
display: flex;
flex-direction: row;
vertical-align: middle;
color: ${({ theme }): string => theme.colors.grey60};
height: ${height};
& img {
border-radius: 9999px;
margin-right: 0 8px;
width: 36px;
height: 36px;
object-fit: cover;
border-radius: 9999px;
}
`
/**
* @memberof LoggedUser
* @alias LoggedUserProps
* @private
*/
export type LoggedUserProps = {
email: string;
title?: string;
avatarUrl?: string;
}
/**
* @classdesc
*
*
*
* Logged in user state in the header
*
*
* ### Usage
*
* ```javascript
* import { LoggedUser, LoggedUserProps } from '@admin-bro/design-system'
* ```
*
* @component
* @subcategory Molecules
* @hideconstructor
* @see {@link https://storybook.adminbro.com/?path=/story/designsystem-molecules-loggeduser--default Storybook}
* @see LoggedUserProps
* @section design-system
* @deprecated In favour of {@link CurrentUserNav} component
*/
export const LoggedUser: React.FC = (props) => {
const { email, title, avatarUrl, children } = props
return (
{email}
{title}
{avatarUrl ? (
) : null}
{children}
)
}