Skip to content

Commit

Permalink
stabilize StyleProps type
Browse files Browse the repository at this point in the history
  • Loading branch information
yukukotani committed Oct 14, 2024
1 parent 4d85864 commit 6da1bba
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/style-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,17 @@ type TokensRef<Kind extends string> =
type CSSProperties = CSS.Properties<(string & {}) | number>;

export type StyleProps =
| CSSProperties
| {
[K in keyof CSSProperties]: K extends ColorProps
? TokensRef<"colors">
? TokensRef<"colors"> | CSSProperties[K]
: K extends SpaceProps
? TokensRef<"spaces">
? TokensRef<"spaces"> | CSSProperties[K]
: K extends SizeProps
? TokensRef<"sizes">
? TokensRef<"sizes"> | CSSProperties[K]
: K extends FontSizeProps
? TokensRef<"fontSizes">
? TokensRef<"fontSizes"> | CSSProperties[K]
: K extends RadiusProps
? TokensRef<"radii">
? TokensRef<"radii"> | CSSProperties[K]
: CSSProperties[K];
}
| {
Expand Down

0 comments on commit 6da1bba

Please sign in to comment.