fix: text overflow problem in <a> tag (#2126)
This commit is contained in:
@@ -165,7 +165,7 @@ export const WorkSpaceSliderBar: React.FC<WorkSpaceSliderBarProps> = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<SettingsIcon />
|
<SettingsIcon />
|
||||||
{t('Workspace Settings')}
|
<div>{t('Workspace Settings')}</div>
|
||||||
</StyledLink>
|
</StyledLink>
|
||||||
</StyledListItem>
|
</StyledListItem>
|
||||||
<StyledListItem
|
<StyledListItem
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ export const StyledListItem = styled('div')<{
|
|||||||
color: active
|
color: active
|
||||||
? 'var(--affine-primary-color)'
|
? 'var(--affine-primary-color)'
|
||||||
: 'var(--affine-text-primary-color)',
|
: 'var(--affine-text-primary-color)',
|
||||||
padding: '0 16px',
|
paddingLeft: '16px',
|
||||||
|
paddingRight: '2px',
|
||||||
borderRadius: '8px',
|
borderRadius: '8px',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
marginBottom: '4px',
|
marginBottom: '4px',
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
import { baseTheme, displayFlex, styled } from '@affine/component';
|
import {
|
||||||
|
baseTheme,
|
||||||
|
displayFlex,
|
||||||
|
styled,
|
||||||
|
textEllipsis,
|
||||||
|
} from '@affine/component';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
const macosElectron = environment.isDesktop && environment.isMacOs;
|
const macosElectron = environment.isDesktop && environment.isMacOs;
|
||||||
@@ -71,6 +76,13 @@ export const StyledLink = styled(Link)(() => {
|
|||||||
':visited': {
|
':visited': {
|
||||||
color: 'inherit',
|
color: 'inherit',
|
||||||
},
|
},
|
||||||
|
overflow: 'hidden',
|
||||||
|
div: {
|
||||||
|
wordBreak: 'break-all',
|
||||||
|
wordWrap: 'break-word',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
...textEllipsis(1),
|
||||||
|
},
|
||||||
userDrag: 'none',
|
userDrag: 'none',
|
||||||
userSelect: 'none',
|
userSelect: 'none',
|
||||||
appRegion: 'no-drag',
|
appRegion: 'no-drag',
|
||||||
|
|||||||
Reference in New Issue
Block a user