aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/ui
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-06-21 06:51:17 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-06-21 06:51:17 +0800
commit1e51af1d4b68bad9363411167fd4eb959e7a32dd (patch)
tree51146dff346547c8348a549064cf2362bb1a80e3 /packages/website/ts/components/ui
parent39ccb2df0b43d3915337259789c393e4603b964c (diff)
downloaddexon-sol-tools-1e51af1d4b68bad9363411167fd4eb959e7a32dd.tar
dexon-sol-tools-1e51af1d4b68bad9363411167fd4eb959e7a32dd.tar.gz
dexon-sol-tools-1e51af1d4b68bad9363411167fd4eb959e7a32dd.tar.bz2
dexon-sol-tools-1e51af1d4b68bad9363411167fd4eb959e7a32dd.tar.lz
dexon-sol-tools-1e51af1d4b68bad9363411167fd4eb959e7a32dd.tar.xz
dexon-sol-tools-1e51af1d4b68bad9363411167fd4eb959e7a32dd.tar.zst
dexon-sol-tools-1e51af1d4b68bad9363411167fd4eb959e7a32dd.zip
Support mobile friendly onboarding flows
Diffstat (limited to 'packages/website/ts/components/ui')
-rw-r--r--packages/website/ts/components/ui/animation.tsx32
-rw-r--r--packages/website/ts/components/ui/container.tsx1
2 files changed, 33 insertions, 0 deletions
diff --git a/packages/website/ts/components/ui/animation.tsx b/packages/website/ts/components/ui/animation.tsx
new file mode 100644
index 000000000..cbda2993d
--- /dev/null
+++ b/packages/website/ts/components/ui/animation.tsx
@@ -0,0 +1,32 @@
+import * as React from 'react';
+import { keyframes, styled } from 'ts/style/theme';
+
+export type AnimationType = 'easeUpFromBottom';
+
+export interface AnimationProps {
+ type: AnimationType;
+}
+
+const PlainAnimation: React.StatelessComponent<AnimationProps> = props => <div {...props} />;
+
+const appearFromBottomFrames = keyframes`
+ from {
+ position: absolute;
+ bottom: -500px;
+ }
+
+ to {
+ position: absolute;
+ bottom: 0px;
+ }
+`;
+
+const animations: { [K in AnimationType]: string } = {
+ easeUpFromBottom: `${appearFromBottomFrames} 1s ease 0s 1 forwards`,
+};
+
+export const Animation = styled(PlainAnimation)`
+ animation: ${props => animations[props.type]};
+`;
+
+Animation.displayName = 'Animation';
diff --git a/packages/website/ts/components/ui/container.tsx b/packages/website/ts/components/ui/container.tsx
index 1776345da..90aec0e7c 100644
--- a/packages/website/ts/components/ui/container.tsx
+++ b/packages/website/ts/components/ui/container.tsx
@@ -23,6 +23,7 @@ export interface ContainerProps {
left?: string;
right?: string;
bottom?: string;
+ zIndex?: number;
}
export const Container: React.StatelessComponent<ContainerProps> = ({ children, className, isHidden, ...style }) => {