Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprinkles: Fix types for numbers as values #59

Merged
merged 1 commit into from
Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/orange-moons-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@vanilla-extract/sprinkles': patch
---

Fix types for numbers as values
8 changes: 5 additions & 3 deletions packages/sprinkles/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ interface Condition {

type BaseConditions = { [conditionName: string]: Condition };

type CSSProperties = CSS.Properties<(string & {}) | number>;

type AtomicProperties = {
[Property in keyof CSS.Properties]?:
| Record<string, CSS.Properties[Property]>
| Array<CSS.Properties[Property]>;
[Property in keyof CSSProperties]?:
| Record<string, CSSProperties[Property]>
| Array<CSSProperties[Property]>;
};

type ShorthandOptions<
Expand Down