Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
paulclindo committed Sep 24, 2021
1 parent d29b5a9 commit 69f9295
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 20 deletions.
Expand Up @@ -103,7 +103,7 @@ export default class TransferSummaryPage extends Component<Props> {
];
return (
<Dialog
styleOverride={{ '--theme-modal-min-max-width-cmn': '680px' }}
styleOverride={{ '--mui-dialog-min-width-cmn': '680px' }}
title={this.props.dialogTitle}
actions={actions}
closeButton={<DialogCloseButton />}
Expand Down
Expand Up @@ -10,7 +10,6 @@ import globalMessages from '../../i18n/global-messages';
import LocalizableError from '../../i18n/LocalizableError';
import CheckboxLabel from '../common/CheckboxLabel';
import styles from './DangerousActionDialog.scss';
import dangerousButtonStyles from '../../themes/overrides/DangerousButton.scss';
import type { $npm$ReactIntl$IntlFormat } from 'react-intl';

type Props = {|
Expand All @@ -35,16 +34,13 @@ type Props = {|

@observer
export default class DangerousActionDialog extends Component<Props> {
static contextTypes: {|intl: $npm$ReactIntl$IntlFormat|} = {
static contextTypes: {| intl: $npm$ReactIntl$IntlFormat |} = {
intl: intlShape.isRequired,
};

render(): Node {
const { intl } = this.context;
const {
isSubmitting,
error,
} = this.props;
const { isSubmitting, error } = this.props;

const dialogClasses = classnames(['removeWalletDialog', styles.dialog]);

Expand All @@ -65,7 +61,7 @@ export default class DangerousActionDialog extends Component<Props> {
primary: true,
className: confirmButtonClasses,
disabled: !this.props.isChecked ? true : undefined,
themeOverrides: dangerousButtonStyles,
danger: true,
isSubmitting: this.props.isSubmitting,
...(this.props.primaryButton ?? Object.freeze({})),
},
Expand All @@ -80,7 +76,6 @@ export default class DangerousActionDialog extends Component<Props> {
className={dialogClasses}
closeButton={<DialogCloseButton onClose={this.props.onCancel} />}
>

{this.props.children}

<div className={styles.checkbox}>
Expand All @@ -91,17 +86,8 @@ export default class DangerousActionDialog extends Component<Props> {
/>
</div>

{error
? (
<p className={styles.error}>
{intl.formatMessage(error, error.values)}
</p>
)
: null
}

{error ? <p className={styles.error}>{intl.formatMessage(error, error.values)}</p> : null}
</Dialog>
);
}

}
2 changes: 2 additions & 0 deletions packages/yoroi-extension/app/styles/overrides/Button.js
Expand Up @@ -70,6 +70,7 @@ const ClassicButton = {
},
'&.Mui-disabled': {
backgroundColor: 'var(--mui-danger-button-background-color-disabled)',
color: 'white',
},
'& .MuiLoadingButton-loadingIndicator': {
color: 'var(--mui-danger-button-background-color)',
Expand Down Expand Up @@ -155,6 +156,7 @@ const ModernButton = {
},
'&.Mui-disabled': {
backgroundColor: 'var(--mui-danger-button-background-color-disabled)',
color: 'white',
},
'& .MuiLoadingButton-loadingIndicator': {
color: 'var(--mui-danger-button-background-color)',
Expand Down
2 changes: 1 addition & 1 deletion packages/yoroi-extension/app/styles/themes/modern-theme.js
Expand Up @@ -78,6 +78,6 @@ export const modernTheme: Object = createTheme({
tooltip: {
fontWeight: 400,
fontSize: '0.75rem',
}
},
},
});

0 comments on commit 69f9295

Please sign in to comment.