Skip to content

Commit

Permalink
make title fit on screen
Browse files Browse the repository at this point in the history
  • Loading branch information
tom0827 committed Jul 9, 2024
1 parent 0dd1301 commit e590bb1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,15 @@ const DocumentFile = ({
<Grid item xs>
<Stack spacing={2} direction="row" alignItems="center">
{documentItem.is_uploaded ? <InsertDriveFileIcon /> : <LinkIcon />}
<Typography>{documentItem.title}</Typography>
<Typography
sx={{
whiteSpace: 'normal',
width: '90%',
wordWrap: 'break-word',
}}
>
{documentItem.title}
</Typography>
</Stack>
</Grid>
<Grid item xs container justifyContent={'flex-end'}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ export function StyledTreeItem(props: StyledTreeItemProps & DocumentTreeItemProp
<Link
sx={{
alignItems: 'center',
display: 'flex',
justifyContent: 'center',
whiteSpace: 'normal',
overflowWrap: 'break-word',
flexDirection: 'column',
maxWidth: '80%',
}}
target="_blank"
href={`${labelUrl}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function DocumentTree({ documentItem }: DocumentTreeProps) {
defaultCollapseIcon={<ArrowDropDownIcon sx={{ height: '35px', width: '35px' }} />}
defaultExpandIcon={<ArrowRightIcon sx={{ height: '35px', width: '35px' }} />}
defaultEndIcon={<div style={{ width: 24 }} />}
sx={{ flexGrow: 1, maxWidth: 400, overflowY: 'auto' }}
sx={{ flexGrow: 1, maxWidth: 1000, overflowY: 'auto' }}
>
<If condition={documentItem.type === 'folder'}>
<Then>
Expand Down

0 comments on commit e590bb1

Please sign in to comment.