import { Box, Button } from '@mui/joy' const ActionButton = ({ action, defaults, sx }) => { if (!action) return null const { label, sx: actionSx, ...props } = action return ( ) } /** * Consistent modal action row. Secondary actions are rendered first and the * primary action is always the final, highest-emphasis control. */ const ModalActions = ({ primary, secondary, tertiary, children, stackOnMobile = false, sx, }) => { const responsiveButtonStyles = stackOnMobile ? { '& > button': { width: { xs: '100%', sm: 'auto' } } } : undefined const layoutSx = { display: 'flex', flexDirection: stackOnMobile ? { xs: 'column-reverse', sm: 'row' } : 'row', justifyContent: 'flex-end', alignItems: 'center', gap: 1, ...responsiveButtonStyles, ...sx, } if (children) return {children} return ( ) } export default ModalActions