system-props
Advanced tools
Comparing version 0.17.0-2 to 0.17.0-3
@@ -42,5 +42,6 @@ import { Property as P, Properties as CSSProperties, Color, Paint } from './css-types'; | ||
} | ||
export declare type MaybeCSSProperty = keyof CSSProperties | (string & {}); | ||
export declare type PropertyConfig = { | ||
properties?: Array<keyof CSSProperties>; | ||
property?: keyof CSSProperties; | ||
properties?: Array<MaybeCSSProperty>; | ||
property?: MaybeCSSProperty; | ||
scale?: string; | ||
@@ -52,3 +53,3 @@ defaultScale?: Array<string | number>; | ||
export interface PropConfigCollection { | ||
[x: string]: true | PropertyConfig; | ||
[key: string]: true | PropertyConfig; | ||
} | ||
@@ -55,0 +56,0 @@ export interface Cache { |
{ | ||
"name": "system-props", | ||
"version": "0.17.0-2", | ||
"version": "0.17.0-3", | ||
"description": "Inspired by styled-system, a responsive, theme-based style props for building design systems with React.", | ||
@@ -5,0 +5,0 @@ "author": "Rogin Farrer", |
import { memoizedGet } from './get'; | ||
import { Props, Cache, StyleFunction, Transform } from '../types'; | ||
import * as CSS from 'csstype'; | ||
import { | ||
Props, | ||
Cache, | ||
StyleFunction, | ||
Transform, | ||
MaybeCSSProperty, | ||
} from '../types'; | ||
@@ -47,3 +52,3 @@ const defaultTransform: Transform = ({ path, object, strict, get }) => { | ||
} | ||
_properties.forEach((prop: keyof CSS.Properties | undefined) => { | ||
_properties.forEach((prop: MaybeCSSProperty | undefined) => { | ||
if (prop) { | ||
@@ -50,0 +55,0 @@ result[prop] = n; |
import { parseResponsiveStyle, parseResponsiveObject } from './parseResponsive'; | ||
import { createStyleFunction } from './createStyleFunction'; | ||
import { memoizedGet as defaultGet, get } from './get'; | ||
import { get } from './get'; | ||
import { | ||
@@ -11,3 +11,2 @@ SystemProp, | ||
Cache, | ||
Get, | ||
} from '../types'; | ||
@@ -14,0 +13,0 @@ import { sort } from './sort'; |
@@ -113,5 +113,7 @@ import { | ||
export type MaybeCSSProperty = keyof CSSProperties | (string & {}); | ||
export type PropertyConfig = { | ||
properties?: Array<keyof CSSProperties>; | ||
property?: keyof CSSProperties; | ||
properties?: Array<MaybeCSSProperty>; | ||
property?: MaybeCSSProperty; | ||
scale?: string; | ||
@@ -124,3 +126,3 @@ defaultScale?: Array<string | number>; | ||
export interface PropConfigCollection { | ||
[x: string]: true | PropertyConfig; | ||
[key: string]: true | PropertyConfig; | ||
} | ||
@@ -127,0 +129,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
5931
372474