aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Klebanoff <steve@0xproject.com>2018-11-28 02:42:05 +0800
committerGitHub <noreply@github.com>2018-11-28 02:42:05 +0800
commitfb1893626f8c3e96182adb3666cdd30d1b629947 (patch)
tree2b1059c274338f58b23994044a2aec2d3d76eafe
parentd23fd23e912ef2ca646048e2df70e2c016ce9986 (diff)
parent4ebc561986d2d46c8b888dfffe2728b47db34959 (diff)
downloaddexon-sol-tools-fb1893626f8c3e96182adb3666cdd30d1b629947.tar
dexon-sol-tools-fb1893626f8c3e96182adb3666cdd30d1b629947.tar.gz
dexon-sol-tools-fb1893626f8c3e96182adb3666cdd30d1b629947.tar.bz2
dexon-sol-tools-fb1893626f8c3e96182adb3666cdd30d1b629947.tar.lz
dexon-sol-tools-fb1893626f8c3e96182adb3666cdd30d1b629947.tar.xz
dexon-sol-tools-fb1893626f8c3e96182adb3666cdd30d1b629947.tar.zst
dexon-sol-tools-fb1893626f8c3e96182adb3666cdd30d1b629947.zip
Merge pull request #1330 from 0xProject/feature/instant/stable-css-classes
[instant] Add stable CSS classes
-rw-r--r--packages/instant/src/components/zero_ex_instant_overlay.tsx9
-rw-r--r--packages/instant/src/constants.ts2
2 files changed, 9 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 2856ea3e3..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}>
+ <Overlay zIndex={zIndex} className={OVERLAY_DIV_CLASS}>
<Flex height="100vh">
<Container position="absolute" top="0px" right="0px" display={{ default: 'initial', sm: 'none' }}>
<Icon
@@ -30,7 +31,11 @@ export const ZeroExInstantOverlay: React.StatelessComponent<ZeroExInstantOverlay
padding="2em 2em"
/>
</Container>
- <Container width={{ default: 'auto', sm: '100%' }} height={{ default: 'auto', sm: '100%' }}>
+ <Container
+ width={{ default: 'auto', sm: '100%' }}
+ height={{ default: 'auto', sm: '100%' }}
+ className={MAIN_CONTAINER_DIV_CLASS}
+ >
<ZeroExInstantContainer />
</Container>
</Flex>
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;