mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-10 15:35:35 +00:00
feat: improve side nav item style and fix some UI issues
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
const TextEllipsis = styled.p({
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
overflow: 'hidden',
|
||||
const TextEllipsis = styled.p<{ lines?: number }>(({ lines = 1 }) => {
|
||||
if (lines > 1) {
|
||||
return {
|
||||
overflow: 'hidden',
|
||||
display: '-webkit-box',
|
||||
WebkitLineClamp: lines,
|
||||
WebkitBoxOrient: 'vertical',
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
overflow: 'hidden',
|
||||
};
|
||||
});
|
||||
|
||||
export default TextEllipsis;
|
||||
|
||||
Reference in New Issue
Block a user