diff --git a/packages/twenty-front/src/pages/settings/SettingsWorkspaceMembers.tsx b/packages/twenty-front/src/pages/settings/SettingsWorkspaceMembers.tsx index 0079fb888..63bbd6717 100644 --- a/packages/twenty-front/src/pages/settings/SettingsWorkspaceMembers.tsx +++ b/packages/twenty-front/src/pages/settings/SettingsWorkspaceMembers.tsx @@ -7,8 +7,8 @@ import { IconUsers, IconReload, IconMail, - StyledText, Avatar, + MOBILE_VIEWPORT, } from 'twenty-ui'; import { isNonEmptyArray } from '@sniptt/guards'; import { useTheme } from '@emotion/react'; @@ -53,6 +53,47 @@ const StyledTable = styled(Table)` margin-top: ${({ theme }) => theme.spacing(0.5)}; `; +const StyledTableRow = styled(TableRow)` + @media (max-width: ${MOBILE_VIEWPORT}px) { + display: grid; + grid-template-columns: 3fr; + } +`; +const StyledTableCell = styled(TableCell)` + padding: ${({ theme }) => theme.spacing(1)}; + @media (max-width: ${MOBILE_VIEWPORT}px) { + &:first-child { + max-width: 100%; + padding-top: 2px; + white-space: nowrap; + overflow: scroll; + scroll-behavior: smooth; + } + } +`; +const StyledIconWrapper = styled.div` + left: 2px; + margin-right: ${({ theme }) => theme.spacing(2)}; + position: relative; + top: 1px; +`; + +const StyledScrollableTextContainer = styled.div` + max-width: 100%; + overflow-x: auto; + white-space: pre-line; +`; + +const StyledTextContainer = styled.div` + color: ${({ theme }) => theme.font.color.secondary}; + max-width: max-content; + overflow-x: auto; + position: absolute; + @media (min-width: 360px) and (max-width: 420px) { + max-width: 150px; + margin-top: ${({ theme }) => theme.spacing(1)}; + } +`; const StyledTableHeaderRow = styled(Table)` margin-bottom: ${({ theme }) => theme.spacing(1.5)}; `; @@ -165,28 +206,25 @@ export const SettingsWorkspaceMembers = () => { - - } - text={ - workspaceMember.name.firstName + + + + + + {workspaceMember.name.firstName + ' ' + - workspaceMember.name.lastName - } - /> + workspaceMember.name.lastName} + - + + {workspaceMember.userEmail} + {currentWorkspaceMember?.id !== workspaceMember.id && ( @@ -225,25 +263,27 @@ export const SettingsWorkspaceMembers = () => { {workspaceInvitations?.map((workspaceInvitation) => ( - - - - } - text={workspaceInvitation.email} - /> - - + + + + + + + {workspaceInvitation.email} + + + - - + + { @@ -266,8 +306,8 @@ export const SettingsWorkspaceMembers = () => { Icon={IconTrash} /> - - + + ))}