From e0beb7fb380e50e4566db4787092f5549a2d6db1 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 21 Nov 2018 11:42:07 -0500 Subject: feat: add more to instant dev env --- packages/instant/public/index.html | 335 ++++++++++++++++++++++--------------- packages/instant/src/index.umd.ts | 7 +- 2 files changed, 202 insertions(+), 140 deletions(-) (limited to 'packages') diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html index 557cfa3dc..8f11502e4 100644 --- a/packages/instant/public/index.html +++ b/packages/instant/public/index.html @@ -1,143 +1,206 @@ + + + + 0x Instant Dev Environment + + + + + + - + .button { + margin: 10px; + } - -
- - + + + + +
+
+
+ + + +
+
+
+ + + diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts index 59f658b33..1d62084b5 100644 --- a/packages/instant/src/index.umd.ts +++ b/packages/instant/src/index.umd.ts @@ -7,6 +7,7 @@ import { ZeroExInstantOverlay, ZeroExInstantOverlayProps } from './index'; import { assert } from './util/assert'; import { util } from './util/util'; +const isInstantRendered = (): boolean => !!document.getElementById(INJECTED_DIV_ID); export interface ZeroExInstantConfig extends ZeroExInstantOverlayProps { shouldDisablePushToHistory?: boolean; } @@ -43,8 +44,8 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z if (!_.isUndefined(config.shouldDisablePushToHistory)) { assert.isBoolean('shouldDisablePushToHistory', config.shouldDisablePushToHistory); } - if (!_.isUndefined(props.shouldDisableAnalyticsTracking)) { - assert.isBoolean('props.shouldDisableAnalyticsTracking', props.shouldDisableAnalyticsTracking); + if (!_.isUndefined(config.shouldDisableAnalyticsTracking)) { + assert.isBoolean('shouldDisableAnalyticsTracking', config.shouldDisableAnalyticsTracking); } assert.isString('selector', selector); // Render instant and return a callback that allows you to remove it from the DOM. @@ -101,5 +102,3 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z }; } }; - -const isInstantRendered = (): boolean => !!document.getElementById(INJECTED_DIV_ID); -- cgit