From: Pawel Kowalczyk Date: Thu, 16 May 2019 10:54:32 +0000 (+0200) Subject: smaller-width-for-icons-on-workflow-panel X-Git-Tag: 1.4.0~5^2~1 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/d5f7c3ce3d66813587e856861f23fa35d08769f9 smaller-width-for-icons-on-workflow-panel Feature #15166 Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk --- diff --git a/src/components/data-table/data-table.tsx b/src/components/data-table/data-table.tsx index e1309793..84137588 100644 --- a/src/components/data-table/data-table.tsx +++ b/src/components/data-table/data-table.tsx @@ -35,7 +35,7 @@ export interface DataTableDataProps { currentRoute?: string; } -type CssRules = "tableBody" | "root" | "content" | "noItemsInfo" | 'tableCell' | 'arrow' | 'arrowButton'; +type CssRules = "tableBody" | "root" | "content" | "noItemsInfo" | 'tableCell' | 'arrow' | 'arrowButton' | 'tableCellWorkflows'; const styles: StyleRulesCallback = (theme: Theme) => ({ root: { @@ -56,6 +56,17 @@ const styles: StyleRulesCallback = (theme: Theme) => ({ tableCell: { wordWrap: 'break-word' }, + tableCellWorkflows: { + '&:nth-last-child(2)': { + padding: '0px', + maxWidth: '48px' + }, + '&:last-child': { + padding: '0px', + paddingRight: '24px', + width: '48px' + } + }, arrow: { margin: 0 }, @@ -125,14 +136,14 @@ export const DataTable = withStyles(styles)( ; } - ArrowIcon = ({className, ...props}: SvgIconProps) => ( + ArrowIcon = ({ className, ...props }: SvgIconProps) => ( - + ) renderBodyRow = (item: any, index: number) => { - const { onRowClick, onRowDoubleClick, extractKey, classes, currentItemUuid } = this.props; + const { onRowClick, onRowDoubleClick, extractKey, classes, currentItemUuid, currentRoute } = this.props; return onRowDoubleClick && onRowDoubleClick(event, item)} selected={item === currentItemUuid}> {this.mapVisibleColumns((column, index) => ( - + {column.render(item)} ))}