Skip to content

Commit

Permalink
put color for each case
Browse files Browse the repository at this point in the history
  • Loading branch information
anistouri committed Nov 2, 2023
1 parent 91275ff commit ef1b249
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/components/react-hook-form/utils/cancel-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,18 @@ import React from 'react';
import { Button } from '@mui/material';
import { FormattedMessage } from 'react-intl';

const styles = {
removeButtonTextColor: (theme) => ({
color: theme.palette.text.primary,
}),
};
const CancelButton = ({
onClick,
variant,
disabled,
withCustomColor = true,
withCustomColor = false,
}) => {
return (
<Button
onClick={onClick}
variant={variant}
disabled={disabled}
sx={withCustomColor ? styles.removeButtonTextColor : null}
color={withCustomColor ? 'primary' : 'secondary'}
>
<FormattedMessage id="cancel" />
</Button>
Expand Down

0 comments on commit ef1b249

Please sign in to comment.