import { styled } from '@mui/material'; import { FC, ReactElement, useMemo } from 'react'; import { v4 as uuidv4 } from 'uuid'; import ContainedButton from './ContainedButton'; import FlexBox from './FlexBox'; import Spinner from './Spinner'; const FlexEndBox = styled(FlexBox)({ justifyContent: 'flex-end', width: '100%', }); const ActionGroup: FC = (props) => { const { actions = [], loading } = props; const elements = useMemo( () => actions.map((actionProps) => ( {actionProps.children} )), [actions], ); return loading ? ( ) : ( {elements} ); }; export default ActionGroup;