1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-28 05:12:18 +01:00
metamask-extension/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-popover.js
Elliot Winkler af971cd5b6
Remove dupe Prettier config from ESLint config (#13234)
The ESLint config for the extension explicitly includes support for
Prettier. However, this is already being provided by our global ESLint
config (`@metamask/eslint-config`). Therefore there is no need to
include it here. In fact, this is causing weird issues where the `curly`
option is getting overridden somehow. After this change, these syntaxes
are invalid:

``` javascript
if (foo) return;
```

``` javascript
if (foo) return 'bar';
```
2022-01-06 15:56:51 -07:00

48 lines
1.5 KiB
JavaScript

import React from 'react';
import { useI18nContext } from '../../../hooks/useI18nContext';
import { useTransactionModalContext } from '../../../contexts/transaction-modal';
import Box from '../../ui/box';
import Popover from '../../ui/popover';
import { AdvancedGasFeePopoverContextProvider } from './context';
import AdvancedGasFeeInputs from './advanced-gas-fee-inputs';
import AdvancedGasFeeGasLimit from './advanced-gas-fee-gas-limit';
import AdvancedGasFeeSaveButton from './advanced-gas-fee-save';
import AdvancedGasFeeDefaults from './advanced-gas-fee-defaults';
const AdvancedGasFeePopover = () => {
const t = useI18nContext();
const {
closeAllModals,
closeModal,
currentModal,
} = useTransactionModalContext();
if (currentModal !== 'advancedGasFee') {
return null;
}
return (
<AdvancedGasFeePopoverContextProvider>
<Popover
className="advanced-gas-fee-popover"
title={t('advancedGasFeeModalTitle')}
onBack={() => closeModal('advancedGasFee')}
onClose={closeAllModals}
footer={<AdvancedGasFeeSaveButton />}
>
<Box margin={4}>
<AdvancedGasFeeInputs />
<div className="advanced-gas-fee-popover__separator" />
<AdvancedGasFeeDefaults />
<div className="advanced-gas-fee-popover__separator" />
<AdvancedGasFeeGasLimit />
</Box>
</Popover>
</AdvancedGasFeePopoverContextProvider>
);
};
export default AdvancedGasFeePopover;