X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/70222e9fc05c3ad515ac290e5cbd6302b4f2efc8..589629e80967dc1f318561fbe6a4174e1da231a6:/src/components/data-explorer/data-explorer.tsx diff --git a/src/components/data-explorer/data-explorer.tsx b/src/components/data-explorer/data-explorer.tsx index 2e3e1a3444..7107bd7082 100644 --- a/src/components/data-explorer/data-explorer.tsx +++ b/src/components/data-explorer/data-explorer.tsx @@ -14,7 +14,7 @@ import { DataTableFilters } from '~/components/data-table-filters/data-table-fil import { MoreOptionsIcon } from '~/components/icon/icon'; import { PaperProps } from '@material-ui/core/Paper'; -type CssRules = 'searchBox' | "toolbar" | "footer" | "root" | 'moreOptionsButton'; +type CssRules = 'searchBox' | "toolbar" | "toolbarUnderTitle" | "footer" | "root" | 'moreOptionsButton' | 'title'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ searchBox: { @@ -23,6 +23,9 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ toolbar: { paddingTop: theme.spacing.unit * 2 }, + toolbarUnderTitle: { + paddingTop: 0 + }, footer: { overflow: 'auto' }, @@ -31,6 +34,11 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ }, moreOptionsButton: { padding: 0 + }, + title: { + paddingLeft: theme.spacing.unit * 3, + paddingTop: theme.spacing.unit * 3, + fontSize: '18px' } }); @@ -50,6 +58,7 @@ interface DataExplorerDataProps { paperProps?: PaperProps; actions?: React.ReactNode; hideSearchInput?: boolean; + title?: React.ReactNode; paperKey?: string; currentItemUuid: string; } @@ -84,16 +93,17 @@ export const DataExplorer = withStyles(styles)( rowsPerPage, rowsPerPageOptions, onColumnToggle, searchValue, onSearch, items, itemsAvailable, onRowClick, onRowDoubleClick, classes, dataTableDefaultView, hideColumnSelector, actions, paperProps, hideSearchInput, - paperKey, fetchMode, currentItemUuid + paperKey, fetchMode, currentItemUuid, title } = this.props; return - {(!hideColumnSelector || !hideSearchInput) && + {title &&
{title}
} + {(!hideColumnSelector || !hideSearchInput) && - {!hideSearchInput &&
- + {!hideSearchInput && -
} + onSearch={onSearch} />} + {actions} {!hideColumnSelector && @@ -126,7 +136,7 @@ export const DataExplorer = withStyles(styles)( variant="text" size="medium" onClick={this.loadMore} - >Load more} + >Load more}
;