- ))
- }
- {
- this.getActiveItem().map((item, index) => (
- <Button
- color="inherit"
- key={index}
- onClick={() => onClick(item)}
- >
- {item.label}
- </Button>
- ))
- }
- </Grid>;
- }
-
- getInactiveItems = () => {
- return this.props.items.slice(0, -1);
- }
-
- getActiveItem = () => {
- return this.props.items.slice(-1);
- }
-
-}