1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from 'react';
6 import { CustomStyleRulesCallback } from 'common/custom-theme';
7 import { Grid } from '@mui/material';
8 import withStyles from '@mui/styles/withStyles';
9 import { WithStyles } from '@mui/styles';
10 import { SvgIconProps } from '@mui/material/SvgIcon';
12 type SelectItemClasses = 'value' | 'icon';
14 const permissionItemStyles: CustomStyleRulesCallback<SelectItemClasses> = theme => ({
16 marginLeft: theme.spacing(1),
19 margin: `${theme.spacing(0.5)} 0`
24 * This component should be used as a child of MenuItem component.
26 export const SelectItem = withStyles(permissionItemStyles)(
27 ({ value, icon: Icon, classes }: { value: string, icon: React.ComponentType<SvgIconProps> } & WithStyles<SelectItemClasses>) => {
29 <Grid container alignItems='center'>
30 <Icon className={classes.icon} />
31 <span className={classes.value}>