aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/style
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-07 03:34:04 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-07 03:34:04 +0800
commitf90486c99c7acf95f3b95fdc73ee125dd3f9086e (patch)
treedced9c830f4fd4d654674cc6064176198193b000 /packages/instant/src/style
parenta2bc62b17a773625220817c79265c017cb61979f (diff)
downloaddexon-sol-tools-f90486c99c7acf95f3b95fdc73ee125dd3f9086e.tar
dexon-sol-tools-f90486c99c7acf95f3b95fdc73ee125dd3f9086e.tar.gz
dexon-sol-tools-f90486c99c7acf95f3b95fdc73ee125dd3f9086e.tar.bz2
dexon-sol-tools-f90486c99c7acf95f3b95fdc73ee125dd3f9086e.tar.lz
dexon-sol-tools-f90486c99c7acf95f3b95fdc73ee125dd3f9086e.tar.xz
dexon-sol-tools-f90486c99c7acf95f3b95fdc73ee125dd3f9086e.tar.zst
dexon-sol-tools-f90486c99c7acf95f3b95fdc73ee125dd3f9086e.zip
wip: mediachoice experiment
Diffstat (limited to 'packages/instant/src/style')
-rw-r--r--packages/instant/src/style/media.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/instant/src/style/media.ts b/packages/instant/src/style/media.ts
index fa7571077..5a0cba668 100644
--- a/packages/instant/src/style/media.ts
+++ b/packages/instant/src/style/media.ts
@@ -1,3 +1,5 @@
+import { InterpolationValue } from 'styled-components';
+
import { css } from './theme';
export enum ScreenWidths {
@@ -17,3 +19,14 @@ export const media = {
medium: generateMediaWrapper(ScreenWidths.Md),
large: generateMediaWrapper(ScreenWidths.Lg),
};
+
+/// media helper
+export interface MediaChoice {
+ sm: string;
+ md?: string;
+ lg?: string;
+}
+// TODO: handle string too
+export const stylesForMedia = (choice: MediaChoice): InterpolationValue[] => {
+ return media.small`width: ${choice.sm}`;
+};