-
Notifications
You must be signed in to change notification settings - Fork 958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Multiple Datasource] Fix style of data source option inside popover for data source selector, selectable, multi select components #6438
Changes from 5 commits
1e23ce0
ceefbd5
dd271c0
7bd95f7
a0cbe06
d1322be
5eecb74
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import React from 'react'; | ||
import { EuiBadge, EuiFlexItem, EuiFlexGroup } from '@elastic/eui'; | ||
import { DataSourceOption } from '../data_source_menu/types'; | ||
|
||
interface DataSourceItemProps { | ||
className: string; | ||
option: DataSourceOption[]; | ||
defaultDataSource: string | null; | ||
} | ||
|
||
export const DataSourceItem = ({ className, option, defaultDataSource }: DataSourceItemProps) => { | ||
return ( | ||
<EuiFlexGroup justifyContent="spaceBetween" className={`${className}OuiFlexGroup`}> | ||
<EuiFlexItem className={`${className}OuiFlexItem`} grow={false}> | ||
{option.label || ''} | ||
</EuiFlexItem> | ||
{option.id === defaultDataSource && ( | ||
<EuiFlexItem grow={false}> | ||
<EuiBadge iconSide="left">Default</EuiBadge> | ||
</EuiFlexItem> | ||
)} | ||
</EuiFlexGroup> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export { DataSourceItem } from './data_source_item'; |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.dataSourceFilterGroupItems { | ||
overflow: scroll; | ||
max-width: 300px; | ||
|
||
.dataSourceFilterGroupOuiFlexGroup { | ||
.dataSourceFilterGroupOuiFlexItem { | ||
text-overflow: ellipsis; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
display: inline-block; | ||
} | ||
} | ||
} |
This file was deleted.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.dataSourceSelectableOuiPanel { | ||
width: 300px; | ||
|
||
.dataSourceSelectableOuiFlexGroup { | ||
.dataSourceSelectableOuiFlexItem { | ||
text-overflow: ellipsis; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
display: inline-block; | ||
} | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we change the name to _data_source_selectable.cscc as a underscore _ shows this is a internal style file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should follow the dev guide |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove style={{}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!