mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-23 20:18:42 +08:00
fix(core): handle text overflow styles for search box (#8054)
This commit is contained in:
@@ -15,6 +15,7 @@ export const root = style({
|
|||||||
padding: '0 12px',
|
padding: '0 12px',
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
whiteSpace: 'nowrap',
|
whiteSpace: 'nowrap',
|
||||||
|
overflow: 'hidden',
|
||||||
});
|
});
|
||||||
export const icon = style({
|
export const icon = style({
|
||||||
marginRight: '8px',
|
marginRight: '8px',
|
||||||
@@ -28,3 +29,8 @@ export const shortcutHint = style({
|
|||||||
color: cssVarV2('text/tertiary'),
|
color: cssVarV2('text/tertiary'),
|
||||||
fontSize: cssVar('fontBase'),
|
fontSize: cssVar('fontBase'),
|
||||||
});
|
});
|
||||||
|
export const quickSearchBarEllipsisStyle = style({
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
});
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ export function QuickSearchInput({ onClick, ...props }: QuickSearchInputProps) {
|
|||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
<SearchIcon className={styles.icon} />
|
<SearchIcon className={styles.icon} />
|
||||||
{t['Quick search']()}
|
<span className={styles.quickSearchBarEllipsisStyle}>
|
||||||
|
{t['Quick search']()}
|
||||||
|
</span>
|
||||||
<div className={styles.spacer} />
|
<div className={styles.spacer} />
|
||||||
<div className={styles.shortcutHint}>
|
<div className={styles.shortcutHint}>
|
||||||
{isMac ? ' ⌘ + K' : ' Ctrl + K'}
|
{isMac ? ' ⌘ + K' : ' Ctrl + K'}
|
||||||
|
|||||||
Reference in New Issue
Block a user