Comparing version 0.2.1 to 0.2.2
@@ -1,7 +0,6 @@ | ||
import { CSSAttribute } from 'goober'; | ||
import { ComponentClass, CSSProperties, FunctionComponent, PropsWithChildren } from 'react'; | ||
export declare type Props = PropsWithChildren<any>; | ||
export declare type Style = CSSProperties & { | ||
[key: string]: string | CSSAttribute; | ||
}; | ||
export declare type As = string | FunctionComponent<any> | ComponentClass<any, any>; | ||
export interface Style extends CSSProperties { | ||
[key: string]: Style | string | number | undefined | null; | ||
} |
{ | ||
"name": "inlines", | ||
"description": "When you just want to use the style prop in React", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "types": "dist/index.d.ts", |
@@ -0,1 +1,2 @@ | ||
import { CSSAttribute } from 'goober' | ||
import { css, keyframes } from 'goober' | ||
@@ -27,3 +28,3 @@ import type { Props, Style } from './types' | ||
} else if (key[1] === 'k') { | ||
s.animation = `${keyframes(value)} 1s` | ||
s.animation = `${keyframes(value as CSSAttribute)} 1s` | ||
continue | ||
@@ -34,3 +35,3 @@ } | ||
} | ||
const className = css({ [key]: value }) | ||
const className = css({ [key]: value as CSSAttribute }) | ||
props.className = props.className | ||
@@ -37,0 +38,0 @@ ? `${props.className} ${className}` |
@@ -1,2 +0,1 @@ | ||
import { CSSAttribute } from 'goober' | ||
import { | ||
@@ -10,3 +9,5 @@ ComponentClass, | ||
export type Props = PropsWithChildren<any> | ||
export type Style = CSSProperties & { [key: string]: string | CSSAttribute } | ||
export type As = string | FunctionComponent<any> | ComponentClass<any, any> | ||
export interface Style extends CSSProperties { | ||
[key: string]: Style | string | number | undefined | null | ||
} |
9783
187