import React from 'react' import {Box, Flex, rem, Stack, Text} from '@sanity/ui' import {styled} from 'styled-components' import {useListFormat, type User, UserAvatar} from 'sanity' import {RobotIcon} from '@sanity/icons' const Root = styled(Flex)` height: ${rem(33)}; // 33 = PREVIEW_SIZES.default.media.height box-sizing: content-box; ` export interface ProjectUserProps { user: User isRobot: boolean roles: string[] } export function ProjectUser({user, isRobot, roles}: ProjectUserProps) { const listFormat = useListFormat({style: 'narrow'}) return ( {isRobot ? ( ) : ( )} {user.displayName} {listFormat.format(roles)} ) }