Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Fix width of data store selector
Browse files Browse the repository at this point in the history
Fixes item "Fix data store selector being too slim in width in DATA
SOURCES panel." of sub-issue
#12 (comment) of
Issue #12.
  • Loading branch information
pont-us committed Aug 18, 2020
1 parent 363b42e commit c107131
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/renderer/containers/DataSourcesPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ class DataSourcesPanel extends React.Component<IDataSourcesPanelProps & IDataSou

private static readonly FLEX_ROW_STYLE: CSSProperties = {display: 'flex', alignItems: 'center', marginBottom: 1};
private static readonly SPACER_STYLE: CSSProperties = {flex: 1};
private static readonly LABEL_STYLE: CSSProperties = {margin: '0 0.5em 0 0', display: 'flex', flexGrow: 1};
private static readonly LABEL_TEXT_STYLE: CSSProperties =
{minWidth: '5em', overflow: 'hidden', whiteSpace: 'nowrap'};
private static readonly SELECT_STYLE: CSSProperties = {flexGrow: 1};

constructor(props: IDataSourcesPanelProps & IDataSourcesPanelDispatch) {
super(props);
Expand Down Expand Up @@ -363,17 +367,18 @@ class DataSourcesPanel extends React.Component<IDataSourcesPanelProps & IDataSou
return (
<React.Fragment>
<div style={DataSourcesPanel.FLEX_ROW_STYLE}>
<Label className="bp3-inline" style={{margin: '0 0 0 0'}}>
Data store:
<Label className="bp3-inline"
style={DataSourcesPanel.LABEL_STYLE}>
<span style={DataSourcesPanel.LABEL_TEXT_STYLE}>Data store:</span>
<HTMLSelect
style={{padding: '0.2em'}}
fill={true}
style={DataSourcesPanel.SELECT_STYLE}
value={selectedDataStore ? selectedDataStore.id : ''}
onChange={this.handleDataStoreSelected}
>
{dataStoreOptions}
</HTMLSelect>
</Label>
<span style={DataSourcesPanel.SPACER_STYLE}/>
<ButtonGroup>
<ToolButton
tooltipContent="Show/hide data store description"
Expand Down

0 comments on commit c107131

Please sign in to comment.