// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; import { ArvadosTheme } from '~/common/custom-theme'; import { StyleRulesCallback, withStyles, WithStyles, Card, CardHeader, CardContent, Grid, Typography } from '@material-ui/core'; import { SubprocessFilter } from '~/components/subprocess-filter/subprocess-filter'; import { SubprocessFilterDataProps } from '~/components/subprocess-filter/subprocess-filter'; type CssRules = 'root' | 'title' | 'gridFilter'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ root: { fontSize: '0.875rem', height: '100%' }, title: { color: theme.palette.grey["700"] }, gridFilter: { height: '20px', marginBottom: theme.spacing.unit, paddingTop: '0px!important', paddingBottom: '0px!important', } }); interface SubprocessesDataProps { subprocessesAmount: number; filters: SubprocessFilterDataProps[]; onToggle: (status: string) => void; } type SubprocessesProps = SubprocessesDataProps & WithStyles; export const SubprocessesCard = withStyles(styles)( ({ classes, filters, subprocessesAmount, onToggle }: SubprocessesProps) => Subprocess and filters } /> { filters.map(filter => onToggle(filter.label)} /> ) } );