aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/style/media.ts
diff options
context:
space:
mode:
authorJacob Evans <dekz@dekz.net>2018-07-04 18:07:05 +0800
committerJacob Evans <jacob@dekz.net>2018-07-04 18:29:54 +0800
commit5915f8430c252a341cac9c5ef645836efd4d7e92 (patch)
tree2d973f3b39d19247855a6320cc48858f0011df40 /packages/website/ts/style/media.ts
parent9e0f06d06055022fff80bbf7a8b6444f72f898ec (diff)
parentaeea3817a48473aec0eb378b0ad6cbe7e7877044 (diff)
downloaddexon-0x-contracts-5915f8430c252a341cac9c5ef645836efd4d7e92.tar
dexon-0x-contracts-5915f8430c252a341cac9c5ef645836efd4d7e92.tar.gz
dexon-0x-contracts-5915f8430c252a341cac9c5ef645836efd4d7e92.tar.bz2
dexon-0x-contracts-5915f8430c252a341cac9c5ef645836efd4d7e92.tar.lz
dexon-0x-contracts-5915f8430c252a341cac9c5ef645836efd4d7e92.tar.xz
dexon-0x-contracts-5915f8430c252a341cac9c5ef645836efd4d7e92.tar.zst
dexon-0x-contracts-5915f8430c252a341cac9c5ef645836efd4d7e92.zip
Merge branch 'v2-prototype' into eth-lightwallet-subprovider-final
Diffstat (limited to 'packages/website/ts/style/media.ts')
-rw-r--r--packages/website/ts/style/media.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/website/ts/style/media.ts b/packages/website/ts/style/media.ts
new file mode 100644
index 000000000..3c992eb9f
--- /dev/null
+++ b/packages/website/ts/style/media.ts
@@ -0,0 +1,14 @@
+import { css } from 'ts/style/theme';
+import { ScreenWidths } from 'ts/types';
+
+const generateMediaWrapper = (screenWidth: ScreenWidths) => (...args: any[]) => css`
+ @media (max-width: ${screenWidth}) {
+ ${css.apply(css, args)};
+ }
+`;
+
+export const media = {
+ small: generateMediaWrapper(ScreenWidths.Sm),
+ medium: generateMediaWrapper(ScreenWidths.Md),
+ large: generateMediaWrapper(ScreenWidths.Lg),
+};