aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/onboarding
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-05-30 03:53:18 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-05-30 03:53:18 +0800
commitf0bbf2cab0ca7aef47699a3954fb0444d5d6d233 (patch)
treee049f55f97223fd11c0dd8ed47f566180ff71b31 /packages/website/ts/components/onboarding
parent338e8be327731116a4a0308ba353266293013dce (diff)
downloaddexon-sol-tools-f0bbf2cab0ca7aef47699a3954fb0444d5d6d233.tar
dexon-sol-tools-f0bbf2cab0ca7aef47699a3954fb0444d5d6d233.tar.gz
dexon-sol-tools-f0bbf2cab0ca7aef47699a3954fb0444d5d6d233.tar.bz2
dexon-sol-tools-f0bbf2cab0ca7aef47699a3954fb0444d5d6d233.tar.lz
dexon-sol-tools-f0bbf2cab0ca7aef47699a3954fb0444d5d6d233.tar.xz
dexon-sol-tools-f0bbf2cab0ca7aef47699a3954fb0444d5d6d233.tar.zst
dexon-sol-tools-f0bbf2cab0ca7aef47699a3954fb0444d5d6d233.zip
Improve tooltip look
Diffstat (limited to 'packages/website/ts/components/onboarding')
-rw-r--r--packages/website/ts/components/onboarding/onboarding_flow.tsx9
-rw-r--r--packages/website/ts/components/onboarding/onboarding_tooltip.tsx15
2 files changed, 16 insertions, 8 deletions
diff --git a/packages/website/ts/components/onboarding/onboarding_flow.tsx b/packages/website/ts/components/onboarding/onboarding_flow.tsx
index 9c416c2e1..8af1a3a3f 100644
--- a/packages/website/ts/components/onboarding/onboarding_flow.tsx
+++ b/packages/website/ts/components/onboarding/onboarding_flow.tsx
@@ -3,6 +3,7 @@ import * as React from 'react';
import { Placement, Popper, PopperChildrenProps } from 'react-popper';
import { OnboardingTooltip } from 'ts/components/onboarding/onboarding_tooltip';
+import { Overlay } from 'ts/components/ui/overlay';
import { zIndex } from 'ts/utils/style';
export interface Step {
@@ -35,9 +36,11 @@ export class OnboardingFlow extends React.Component<OnboardingFlowProps> {
return null;
}
return (
- <Popper referenceElement={this._getElementForStep()} placement={this._getCurrentStep().placement}>
- {this._renderPopperChildren.bind(this)}
- </Popper>
+ <Overlay onClick={this.props.onClose}>
+ <Popper referenceElement={this._getElementForStep()} placement={this._getCurrentStep().placement}>
+ {this._renderPopperChildren.bind(this)}
+ </Popper>
+ </Overlay>
);
}
diff --git a/packages/website/ts/components/onboarding/onboarding_tooltip.tsx b/packages/website/ts/components/onboarding/onboarding_tooltip.tsx
index 3994b0546..2d316b6b7 100644
--- a/packages/website/ts/components/onboarding/onboarding_tooltip.tsx
+++ b/packages/website/ts/components/onboarding/onboarding_tooltip.tsx
@@ -1,5 +1,6 @@
import * as React from 'react';
+import { Container } from 'ts/components/ui/container';
import { Island } from 'ts/components/ui/island';
export interface OnboardingTooltipProps {
@@ -13,10 +14,14 @@ export interface OnboardingTooltipProps {
export const OnboardingTooltip: React.StatelessComponent<OnboardingTooltipProps> = (props: OnboardingTooltipProps) => (
<Island>
- {props.title}
- {props.content}
- <button onClick={props.onClickBack}>Back</button>
- <button onClick={props.onClickNext}>Skip</button>
- <button onClick={props.onClose}>Close</button>
+ <Container paddingRight="30px" paddingLeft="30px" maxWidth={350} paddingTop="15px" paddingBottom="15px">
+ <div className="flex flex-column">
+ {props.title}
+ {props.content}
+ <button onClick={props.onClickBack}>Back</button>
+ <button onClick={props.onClickNext}>Skip</button>
+ <button onClick={props.onClose}>Close</button>
+ </div>
+ </Container>
</Island>
);