1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from 'react';
6 import { ChevronRight } from '@material-ui/icons';
7 import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
8 import { ArvadosTheme } from 'common/custom-theme';
10 type CssRules = 'root' | 'default' | 'expanded';
12 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
16 justifyContent: 'center',
22 transition: 'all 0.1s ease',
23 transform: 'rotate(0deg)',
26 transition: 'all 0.1s ease',
27 transform: 'rotate(90deg)',
31 export interface ExpandChevronRightDataProps {
35 type ExpandChevronRightProps = ExpandChevronRightDataProps & WithStyles<CssRules>;
37 export const ExpandChevronRight = withStyles(styles)(
38 class extends React.Component<ExpandChevronRightProps, {}> {
40 const { classes, expanded } = this.props;
42 <div className={classes.root}>
43 <ChevronRight className={expanded ? classes.expanded : classes.default} />