X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4cad4c0d882111b0eb5576005108a62ff30b143d..1b7a371a20a0ce0f4811e1b58222f1d837b62337:/src/components/breadcrumbs/breadcrumbs.tsx diff --git a/src/components/breadcrumbs/breadcrumbs.tsx b/src/components/breadcrumbs/breadcrumbs.tsx index 207823307c..2cb81205db 100644 --- a/src/components/breadcrumbs/breadcrumbs.tsx +++ b/src/components/breadcrumbs/breadcrumbs.tsx @@ -2,17 +2,21 @@ // // SPDX-License-Identifier: AGPL-3.0 -import * as React from 'react'; +import React from 'react'; import { Button, Grid, StyleRulesCallback, WithStyles, Typography, Tooltip } from '@material-ui/core'; import ChevronRightIcon from '@material-ui/icons/ChevronRight'; import { withStyles } from '@material-ui/core'; import { IllegalNamingWarning } from '../warning/warning'; +import { IconType, FreezeIcon } from 'components/icon/icon'; +import grey from '@material-ui/core/colors/grey'; export interface Breadcrumb { label: string; + icon?: IconType; + isFrozen?: boolean; } -type CssRules = "item" | "currentItem" | "label"; +type CssRules = "item" | "currentItem" | "label" | "icon"; const styles: StyleRulesCallback = theme => ({ item: { @@ -23,7 +27,12 @@ const styles: StyleRulesCallback = theme => ({ }, label: { textTransform: "none" - } + }, + icon: { + fontSize: 20, + color: grey["600"], + marginRight: '10px' + }, }); export interface BreadcrumbsProps { @@ -34,20 +43,31 @@ export interface BreadcrumbsProps { export const Breadcrumbs = withStyles(styles)( ({ classes, onClick, onContextMenu, items }: BreadcrumbsProps & WithStyles) => - + { items.map((item, index) => { const isLastItem = index === items.length - 1; const isFirstItem = index === 0; + const Icon = item.icon || (() => (null)); return ( {isFirstItem ? null : }