Handle typography with more than 2 lines
This commit is contained in:
@@ -18,7 +18,7 @@ export const TypographyMaxLines = styled(Typography, {
|
|||||||
shouldForwardProp: shouldForwardProp<TypographyMaxLinesProps>(['lines']),
|
shouldForwardProp: shouldForwardProp<TypographyMaxLinesProps>(['lines']),
|
||||||
})<TypographyMaxLinesProps>(({ lines = 2 }) => ({
|
})<TypographyMaxLinesProps>(({ lines = 2 }) => ({
|
||||||
lineHeight: '1.5rem',
|
lineHeight: '1.5rem',
|
||||||
maxHeight: '3rem',
|
maxHeight: `${3 * lines}rem`,
|
||||||
display: '-webkit-box',
|
display: '-webkit-box',
|
||||||
WebkitLineClamp: `${lines}`,
|
WebkitLineClamp: `${lines}`,
|
||||||
WebkitBoxOrient: 'vertical',
|
WebkitBoxOrient: 'vertical',
|
||||||
|
|||||||
Reference in New Issue
Block a user