- ))
- }
- {
- getActiveItem(items).map((item, index) => (
- <Button
- color="inherit"
- key={index}
- onClick={() => onClick(item)}
- >
- {item.label}
- </Button>
- ))
- }
- </Grid>;
-};
-
-const getInactiveItems = (items: Breadcrumb[]) => {
- return items.slice(0, -1);
-};
-
-const getActiveItem = (items: Breadcrumb[]) => {
- return items.slice(-1);
-};
-
-type CssRules = 'inactiveItem';
-
-const styles: StyleRulesCallback<CssRules> = theme => {
- const { unit } = theme.spacing;
- return {
- inactiveItem: {
- opacity: 0.6
- }
- };
-};
-
-export default withStyles(styles)(Breadcrumbs);
-