Skip to content

Commit

Permalink
Merge pull request #1940 from cozy/fix/squareAppIconSpaceEllipsis
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleface authored Nov 2, 2021
2 parents c6dd024 + bcd521c commit 09ced6d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion react/SquareAppIcon/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const theme = useCozyTheme()
<SquareAppIcon name="Add" variant="add" />
</Grid>
<Grid item>
<SquareAppIcon app="testapp" name="No Account" variant="ghost" />
<SquareAppIcon app="testapp" name="No Account long name very very very very long" variant="ghost" />
</Grid>
<Grid item>
<SquareAppIcon name="Shortcut" variant="shortcut" />
Expand Down
16 changes: 8 additions & 8 deletions react/SquareAppIcon/__snapshots__/SquareAppIcon.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ exports[`SquareAppIcon component should render an app correctly with the app nam
/>
</span>
<h6
class="MuiTypography-root makeStyles-name-7 u-ellipsis u-ov-hidden MuiTypography-h6 MuiTypography-alignCenter"
class="MuiTypography-root makeStyles-name-7 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
>
Test
</h6>
Expand Down Expand Up @@ -77,7 +77,7 @@ exports[`SquareAppIcon component should render an app correctly with the given n
/>
</span>
<h6
class="MuiTypography-root makeStyles-name-1 u-ellipsis u-ov-hidden MuiTypography-h6 MuiTypography-alignCenter"
class="MuiTypography-root makeStyles-name-1 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
>
modified
</h6>
Expand Down Expand Up @@ -119,7 +119,7 @@ exports[`SquareAppIcon component should render an app with the app slug if no na
/>
</span>
<h6
class="MuiTypography-root makeStyles-name-13 u-ellipsis u-ov-hidden MuiTypography-h6 MuiTypography-alignCenter"
class="MuiTypography-root makeStyles-name-13 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
>
testslug
</h6>
Expand Down Expand Up @@ -168,7 +168,7 @@ exports[`SquareAppIcon component should render correctly an app in add state 1`]
/>
</span>
<h6
class="MuiTypography-root makeStyles-name-37 u-ellipsis u-ov-hidden MuiTypography-h6 MuiTypography-alignCenter"
class="MuiTypography-root makeStyles-name-37 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
/>
</div>
`;
Expand Down Expand Up @@ -220,7 +220,7 @@ exports[`SquareAppIcon component should render correctly an app in error state 1
/>
</span>
<h6
class="MuiTypography-root makeStyles-name-31 u-ellipsis u-ov-hidden MuiTypography-h6 MuiTypography-alignCenter"
class="MuiTypography-root makeStyles-name-31 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
>
Test
</h6>
Expand Down Expand Up @@ -262,7 +262,7 @@ exports[`SquareAppIcon component should render correctly an app in ghost state 1
/>
</span>
<h6
class="MuiTypography-root makeStyles-name-25 u-ellipsis u-ov-hidden MuiTypography-h6 MuiTypography-alignCenter"
class="MuiTypography-root makeStyles-name-25 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
>
Test
</h6>
Expand Down Expand Up @@ -304,7 +304,7 @@ exports[`SquareAppIcon component should render correctly an app in maintenance s
/>
</span>
<h6
class="MuiTypography-root makeStyles-name-19 u-ellipsis u-ov-hidden MuiTypography-h6 MuiTypography-alignCenter"
class="MuiTypography-root makeStyles-name-19 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
>
Test
</h6>
Expand Down Expand Up @@ -349,7 +349,7 @@ exports[`SquareAppIcon component should render correctly an app in shortcut stat
</span>
</span>
<h6
class="MuiTypography-root makeStyles-name-43 u-ellipsis u-ov-hidden MuiTypography-h6 MuiTypography-alignCenter"
class="MuiTypography-root makeStyles-name-43 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
>
shortcut
</h6>
Expand Down
5 changes: 4 additions & 1 deletion react/SquareAppIcon/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ const useStyles = makeStyles(theme => ({
lineHeight: '1.188rem',
margin: '0.5rem 0.25rem 0 0.25rem',
textShadow: theme.textShadows[1],
lineClamp: '2',
boxOrient: 'vertical',
display: '-webkit-box',
height: '2.375rem',
[theme.breakpoints.down('sm')]: {
width: '3.75rem',
Expand Down Expand Up @@ -121,7 +124,7 @@ export const SquareAppIcon = ({ app, name, variant }) => {
</Badge>
</InfosBadge>
<Typography
className={cx(classes.name, 'u-ellipsis', 'u-ov-hidden')}
className={cx(classes.name, 'u-spacellipsis')}
variant="h6"
align="center"
>
Expand Down

0 comments on commit 09ced6d

Please sign in to comment.