Skip to content

Commit

Permalink
Modify the button of selectable component to fix the title overflow i…
Browse files Browse the repository at this point in the history
…ssue (#6465) (#6495)

* Modify the button of selectable component to fix the title overflow issue

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* update snapshot

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

---------

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>
(cherry picked from commit b619ccb)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Lu Yu <[email protected]>
  • Loading branch information
3 people authored Apr 18, 2024
1 parent cbf7f91 commit ded4759
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.dataSourceComponentButtonTitle {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: auto;
max-width: 16ch;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ import {
} from '../data_source_menu/types';
import { DataSourceErrorMenu } from '../data_source_error_menu';
import { DataSourceItem } from '../data_source_item';
import './data_source_selectable.scss';
import { DataSourceDropDownHeader } from '../drop_down_header';
import '../button_title.scss';
import './data_source_selectable.scss';

interface DataSourceSelectableProps {
savedObjectsClient: SavedObjectsClientContract;
Expand Down Expand Up @@ -248,7 +249,7 @@ export class DataSourceSelectable extends React.Component<
const button = (
<>
<EuiButtonEmpty
className="euiHeaderLink"
className={'euiHeaderLink dataSourceComponentButtonTitle'}
onClick={this.onClick.bind(this)}
data-test-subj="dataSourceSelectableContextMenuHeaderLink"
aria-label={i18n.translate('dataSourceSelectable.dataSourceOptionsButtonAriaLabel', {
Expand Down

0 comments on commit ded4759

Please sign in to comment.