import makeStyles from '@mui/styles/makeStyles'; import Button from '@mui/material/Button'; import { Grid2, Divider } from '@mui/material'; // ActionButtons does NOT have getPConnect. So, no need to extend from PConnProps interface ActionButtonsProps { // If any, enter additional props that only exist on this component arMainButtons?: any[]; arSecondaryButtons?: any[]; onButtonPress: any; } const useStyles = makeStyles(theme => ({ divider: { marginTop: '10px', marginBottom: '10px' }, secondaryButton: { backgroundColor: theme.actionButtons.secondary.backgroundColor, color: theme.actionButtons.secondary.color }, primaryButton: { backgroundColor: theme.actionButtons.primary.backgroundColor, color: theme.actionButtons.primary.color } })); export default function ActionButtons(props: ActionButtonsProps) { const { arMainButtons = [], arSecondaryButtons = [], onButtonPress } = props; const classes = useStyles(); const localizedVal = PCore.getLocaleUtils().getLocaleValue; const localeCategory = 'Assignment'; function _onButtonPress(sAction: string, sButtonType: string) { onButtonPress(sAction, sButtonType); } return ( <> {arSecondaryButtons.map(sButton => ( ))} {arMainButtons.map(mButton => ( ))} ); }