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 '@mui/icons-material';
7 import { CustomStyleRulesCallback } from 'common/custom-theme';
8 import { WithStyles } from '@mui/styles';
9 import withStyles from '@mui/styles/withStyles';
10 import { ArvadosTheme } from 'common/custom-theme';
12 type CssRules = 'root' | 'default' | 'expanded';
14 const styles: CustomStyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
18 justifyContent: 'center',
24 transition: 'all 0.1s ease',
25 transform: 'rotate(0deg)',
28 transition: 'all 0.1s ease',
29 transform: 'rotate(90deg)',
33 export interface ExpandChevronRightDataProps {
37 type ExpandChevronRightProps = ExpandChevronRightDataProps & WithStyles<CssRules>;
39 export const ExpandChevronRight = withStyles(styles)(
40 class extends React.Component<ExpandChevronRightProps, {}> {
42 const { classes, expanded } = this.props;
44 <div className={classes.root}>
45 <ChevronRight className={expanded ? classes.expanded : classes.default} />