diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-11-07 07:59:16 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-11-07 07:59:16 +0800 |
commit | 10da1e24e13b728c2837e5360a48fcb2913855a5 (patch) | |
tree | 6e2421617a5ac499ea1224ba50b99120dc6b2ca0 /packages/instant/src/components/zero_ex_instant_container.tsx | |
parent | 42c441fafa0a0c2de45904a2f67293152dd954b2 (diff) | |
download | dexon-sol-tools-10da1e24e13b728c2837e5360a48fcb2913855a5.tar dexon-sol-tools-10da1e24e13b728c2837e5360a48fcb2913855a5.tar.gz dexon-sol-tools-10da1e24e13b728c2837e5360a48fcb2913855a5.tar.bz2 dexon-sol-tools-10da1e24e13b728c2837e5360a48fcb2913855a5.tar.lz dexon-sol-tools-10da1e24e13b728c2837e5360a48fcb2913855a5.tar.xz dexon-sol-tools-10da1e24e13b728c2837e5360a48fcb2913855a5.tar.zst dexon-sol-tools-10da1e24e13b728c2837e5360a48fcb2913855a5.zip |
feat: make instant resistant to external styles
Diffstat (limited to 'packages/instant/src/components/zero_ex_instant_container.tsx')
-rw-r--r-- | packages/instant/src/components/zero_ex_instant_container.tsx | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index 851dfa2db..efcb263ba 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -12,6 +12,7 @@ import { ColorOption } from '../style/theme'; import { zIndex } from '../style/z_index'; import { SlideAnimationState } from './animations/slide_animation'; +import { CSSReset } from './css_reset'; import { SlidingPanel } from './sliding_panel'; import { Container } from './ui/container'; import { Flex } from './ui/flex'; @@ -27,35 +28,37 @@ export class ZeroExInstantContainer extends React.Component<ZeroExInstantContain }; public render(): React.ReactNode { return ( - <Container width="350px" position="relative"> - <Container zIndex={zIndex.errorPopup} position="relative"> - <LatestError /> - </Container> - <Container - zIndex={zIndex.mainContainer} - position="relative" - backgroundColor={ColorOption.white} - borderRadius="3px" - hasBoxShadow={true} - overflow="hidden" - > - <Flex direction="column" justify="flex-start"> - <SelectedAssetInstantHeading onSelectAssetClick={this._handleSymbolClick} /> - <SelectedAssetBuyOrderProgress /> - <LatestBuyQuoteOrderDetails /> - <Container padding="20px" width="100%"> - <SelectedAssetBuyOrderStateButtons /> - </Container> - </Flex> - <SlidingPanel - title="Select Token" - animationState={this.state.tokenSelectionPanelAnimationState} - onClose={this._handlePanelClose} + <CSSReset> + <Container width="350px" position="relative"> + <Container zIndex={zIndex.errorPopup} position="relative"> + <LatestError /> + </Container> + <Container + zIndex={zIndex.mainContainer} + position="relative" + backgroundColor={ColorOption.white} + borderRadius="3px" + hasBoxShadow={true} + overflow="hidden" > - <AvailableERC20TokenSelector onTokenSelect={this._handlePanelClose} /> - </SlidingPanel> + <Flex direction="column" justify="flex-start"> + <SelectedAssetInstantHeading onSelectAssetClick={this._handleSymbolClick} /> + <SelectedAssetBuyOrderProgress /> + <LatestBuyQuoteOrderDetails /> + <Container padding="20px" width="100%"> + <SelectedAssetBuyOrderStateButtons /> + </Container> + </Flex> + <SlidingPanel + title="Select Token" + animationState={this.state.tokenSelectionPanelAnimationState} + onClose={this._handlePanelClose} + > + <AvailableERC20TokenSelector onTokenSelect={this._handlePanelClose} /> + </SlidingPanel> + </Container> </Container> - </Container> + </CSSReset> ); } private readonly _handleSymbolClick = (): void => { |