Skip to content

Commit bc306fa

Browse files
fix(core): handle text overflow styles for search box (#8054)
1 parent bd8c844 commit bc306fa

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/frontend/core/src/components/app-sidebar/quick-search-input/index.css.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const root = style({
1515
padding: '0 12px',
1616
position: 'relative',
1717
whiteSpace: 'nowrap',
18+
overflow: 'hidden',
1819
});
1920
export const icon = style({
2021
marginRight: '8px',
@@ -28,3 +29,8 @@ export const shortcutHint = style({
2829
color: cssVarV2('text/tertiary'),
2930
fontSize: cssVar('fontBase'),
3031
});
32+
export const quickSearchBarEllipsisStyle = style({
33+
overflow: 'hidden',
34+
textOverflow: 'ellipsis',
35+
whiteSpace: 'nowrap',
36+
});

packages/frontend/core/src/components/app-sidebar/quick-search-input/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ export function QuickSearchInput({ onClick, ...props }: QuickSearchInputProps) {
2222
onClick={onClick}
2323
>
2424
<SearchIcon className={styles.icon} />
25-
{t['Quick search']()}
25+
<span className={styles.quickSearchBarEllipsisStyle}>
26+
{t['Quick search']()}
27+
</span>
2628
<div className={styles.spacer} />
2729
<div className={styles.shortcutHint}>
2830
{isMac ? ' ⌘ + K' : ' Ctrl + K'}

0 commit comments

Comments
 (0)