aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-28 01:01:49 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-28 01:01:49 +0800
commite08fb72cf10f5260966e4dfd84873c326ff4ea61 (patch)
tree2740fb2dfaddf9b42a9d18042d81039767028533 /packages/instant/src
parentf3d08c13ebf337f4f5e174dd003cd436a6ad5417 (diff)
downloaddexon-sol-tools-e08fb72cf10f5260966e4dfd84873c326ff4ea61.tar
dexon-sol-tools-e08fb72cf10f5260966e4dfd84873c326ff4ea61.tar.gz
dexon-sol-tools-e08fb72cf10f5260966e4dfd84873c326ff4ea61.tar.bz2
dexon-sol-tools-e08fb72cf10f5260966e4dfd84873c326ff4ea61.tar.lz
dexon-sol-tools-e08fb72cf10f5260966e4dfd84873c326ff4ea61.tar.xz
dexon-sol-tools-e08fb72cf10f5260966e4dfd84873c326ff4ea61.tar.zst
dexon-sol-tools-e08fb72cf10f5260966e4dfd84873c326ff4ea61.zip
Use constants
Diffstat (limited to 'packages/instant/src')
-rw-r--r--packages/instant/src/components/zero_ex_instant_overlay.tsx5
-rw-r--r--packages/instant/src/constants.ts2
2 files changed, 5 insertions, 2 deletions
diff --git a/packages/instant/src/components/zero_ex_instant_overlay.tsx b/packages/instant/src/components/zero_ex_instant_overlay.tsx
index 7fbac7475..b3fb57dd6 100644
--- a/packages/instant/src/components/zero_ex_instant_overlay.tsx
+++ b/packages/instant/src/components/zero_ex_instant_overlay.tsx
@@ -1,6 +1,7 @@
import * as React from 'react';
import { ZeroExInstantContainer } from '../components/zero_ex_instant_container';
+import { MAIN_CONTAINER_DIV_CLASS, OVERLAY_DIV_CLASS } from '../constants';
import { ColorOption } from '../style/theme';
import { Container } from './ui/container';
@@ -18,7 +19,7 @@ export const ZeroExInstantOverlay: React.StatelessComponent<ZeroExInstantOverlay
const { onClose, zIndex, ...rest } = props;
return (
<ZeroExInstantProvider {...rest}>
- <Overlay zIndex={zIndex} className="zeroExInstantOverlay">
+ <Overlay zIndex={zIndex} className={OVERLAY_DIV_CLASS}>
<Flex height="100vh">
<Container position="absolute" top="0px" right="0px" display={{ default: 'initial', sm: 'none' }}>
<Icon
@@ -33,7 +34,7 @@ export const ZeroExInstantOverlay: React.StatelessComponent<ZeroExInstantOverlay
<Container
width={{ default: 'auto', sm: '100%' }}
height={{ default: 'auto', sm: '100%' }}
- className="zeroExInstantMainContainer"
+ className={MAIN_CONTAINER_DIV_CLASS}
>
<ZeroExInstantContainer />
</Container>
diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts
index be6077ca9..163be40b3 100644
--- a/packages/instant/src/constants.ts
+++ b/packages/instant/src/constants.ts
@@ -7,6 +7,8 @@ export const ETH_DECIMALS = 18;
export const DEFAULT_ZERO_EX_CONTAINER_SELECTOR = '#zeroExInstantContainer';
export const INJECTED_DIV_CLASS = 'zeroExInstantResetRoot';
export const INJECTED_DIV_ID = 'zeroExInstant';
+export const OVERLAY_DIV_CLASS = 'zeroExInstantOverlay';
+export const MAIN_CONTAINER_DIV_CLASS = 'zeroExInstantMainContainer';
export const WEB_3_WRAPPER_TRANSACTION_FAILED_ERROR_MSG_PREFIX = 'Transaction failed';
export const GWEI_IN_WEI = new BigNumber(1000000000);
export const ONE_SECOND_MS = 1000;