From db6c2a2a9b611dab8d0ba919a7cad3c9a1712ab1 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Fri, 14 Aug 2020 10:11:16 -0400 Subject: [PATCH] stash --- packages/react-base16-styling/src/index.ts | 3 ++- packages/react-base16-styling/src/types.ts | 3 +++ packages/react-base16-styling/test/index.test.ts | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/react-base16-styling/src/index.ts b/packages/react-base16-styling/src/index.ts index 25b148b2..708ac783 100644 --- a/packages/react-base16-styling/src/index.ts +++ b/packages/react-base16-styling/src/index.ts @@ -1,5 +1,6 @@ import curry from 'lodash.curry'; import * as base16 from 'base16'; +import { Base16Theme } from 'base16'; import rgb2hex from 'pure-color/convert/rgb2hex'; import parse from 'pure-color/parse'; import flow from 'lodash.flow'; @@ -148,7 +149,7 @@ const getStylingByKeys = (mergedStyling, keys, ...args) => { return props; }; -export const invertBase16Theme = (base16Theme) => +export const invertBase16Theme = (base16Theme: Base16Theme) => Object.keys(base16Theme).reduce( (t, key) => ( (t[key] = /^base/.test(key) diff --git a/packages/react-base16-styling/src/types.ts b/packages/react-base16-styling/src/types.ts index e69de29b..20cfc650 100644 --- a/packages/react-base16-styling/src/types.ts +++ b/packages/react-base16-styling/src/types.ts @@ -0,0 +1,3 @@ +import { Base16Theme } from 'base16'; + +export type Theme = string | Base16Theme | StylingConfig; diff --git a/packages/react-base16-styling/test/index.test.ts b/packages/react-base16-styling/test/index.test.ts index d1de7720..b1b71766 100644 --- a/packages/react-base16-styling/test/index.test.ts +++ b/packages/react-base16-styling/test/index.test.ts @@ -1,5 +1,5 @@ import { createStyling, invertBase16Theme, getBase16Theme } from '../src'; -import apathy from 'base16/lib/apathy'; +import { apathy } from 'base16'; const base16Theme = { scheme: 'myscheme',