From d4fda9299d54818dea306400813cfbee2627a5bc Mon Sep 17 00:00:00 2001 From: Michal Klobukowski Date: Fri, 15 Jun 2018 15:09:54 +0200 Subject: [PATCH] Update breadcrumbs layout to handle longer entries Feature #13628 Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski --- src/components/breadcrumbs/breadcrumbs.tsx | 31 +++++++++++++++------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/components/breadcrumbs/breadcrumbs.tsx b/src/components/breadcrumbs/breadcrumbs.tsx index 25f30a1b..41f71981 100644 --- a/src/components/breadcrumbs/breadcrumbs.tsx +++ b/src/components/breadcrumbs/breadcrumbs.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; -import { Button, Grid, StyleRulesCallback, WithStyles } from '@material-ui/core'; +import { Button, Grid, StyleRulesCallback, WithStyles, Typography, Tooltip } from '@material-ui/core'; import ChevronRightIcon from '@material-ui/icons/ChevronRight'; import { withStyles } from '@material-ui/core'; @@ -17,19 +17,27 @@ interface BreadcrumbsProps { } const Breadcrumbs: React.SFC> = ({ classes, onClick, items }) => { - return + return { items.map((item, index) => { const isLastItem = index === items.length - 1; return ( - + + + { !isLastItem && } @@ -40,7 +48,7 @@ const Breadcrumbs: React.SFC> = ({ class ; }; -type CssRules = "item" | "currentItem"; +type CssRules = "item" | "currentItem" | "label"; const styles: StyleRulesCallback = theme => { const { unit } = theme.spacing; @@ -50,6 +58,9 @@ const styles: StyleRulesCallback = theme => { }, currentItem: { opacity: 1 + }, + label: { + textTransform: "none" } }; }; -- 2.30.2