Skip to content

Commit

Permalink
docs: Add note about defining properties inline inside `createSprinkl…
Browse files Browse the repository at this point in the history
…es` (#1332)

Co-authored-by: Michael Taranto <michaeltaranto@users.noreply.github.com>
  • Loading branch information
askoufis and michaeltaranto committed Mar 8, 2024
1 parent 8c2ac42 commit bffdabd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions site/docs/packages/sprinkles.md
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,9 @@ const properties = defineProperties({

Creates a type-safe function for accessing your [defined properties](#defineProperties). You can provide as many collections of properties as you like.

> 🚧&nbsp;&nbsp;Ensure properties are defined as variables before passing them into `createSprinkles`.
> Calling `defineProperties` inside a `createSprinkles` call will cause types to be inferred incorrectly, resulting in a type-unsafe sprinkles function.
```ts
// sprinkles.css.ts
import {
Expand Down

0 comments on commit bffdabd

Please sign in to comment.