Skip to content

Commit f9f8ac4

Browse files
Version Packages (#384)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent f8082b9 commit f9f8ac4

File tree

5 files changed

+42
-47
lines changed

5 files changed

+42
-47
lines changed

.changeset/rare-lemons-study.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

fixtures/recipes/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"private": true,
88
"dependencies": {
99
"@vanilla-extract/css": "1.6.0",
10-
"@vanilla-extract/recipes": "0.1.1"
10+
"@vanilla-extract/recipes": "0.2.0"
1111
}
1212
}

packages/recipes/CHANGELOG.md

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,46 @@
11
# @vanilla-extract/recipes
22

3-
## 0.1.1
4-
### Patch Changes
3+
## 0.2.0
54

5+
### Minor Changes
66

7+
- [#376](https://github.com/seek-oss/vanilla-extract/pull/376) [`f8082b9`](https://github.com/seek-oss/vanilla-extract/commit/f8082b9b62c57f394bf82cf05296a680c3ef177b) Thanks [@TheMightyPenguin](https://github.com/TheMightyPenguin)! - Add `RecipeVariants` type
78

8-
- [#380](https://github.com/seek-oss/vanilla-extract/pull/380) [`3ae2422`](https://github.com/seek-oss/vanilla-extract/commit/3ae24220e2187475561e0be54631558076370fa4) Thanks [@mattcompiles](https://github.com/mattcompiles)! - Add variant group names to debug IDs
9+
A utility to make use of the recipe’s type interface. This can be useful when typing functions or component props that need to accept recipe values as part of their interface.
10+
11+
```ts
12+
// button.css.ts
13+
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
14+
15+
export const button = recipe({
16+
variants: {
17+
color: {
18+
neutral: { background: 'whitesmoke' },
19+
brand: { background: 'blueviolet' },
20+
accent: { background: 'slateblue' },
21+
},
22+
size: {
23+
small: { padding: 12 },
24+
medium: { padding: 16 },
25+
large: { padding: 24 },
26+
},
27+
},
28+
});
29+
30+
// Get the type
31+
export type ButtonVariants = RecipeVariants<typeof button>;
932

33+
// the above will result in a type equivalent to:
34+
export type ButtonVariants = {
35+
color?: 'neutral' | 'brand' | 'accent';
36+
size?: 'small' | 'medium' | 'large';
37+
};
38+
```
1039

40+
## 0.1.1
41+
42+
### Patch Changes
43+
44+
- [#380](https://github.com/seek-oss/vanilla-extract/pull/380) [`3ae2422`](https://github.com/seek-oss/vanilla-extract/commit/3ae24220e2187475561e0be54631558076370fa4) Thanks [@mattcompiles](https://github.com/mattcompiles)! - Add variant group names to debug IDs
1145

12-
- [#380](https://github.com/seek-oss/vanilla-extract/pull/380) [`3ae2422`](https://github.com/seek-oss/vanilla-extract/commit/3ae24220e2187475561e0be54631558076370fa4) Thanks [@mattcompiles](https://github.com/mattcompiles)! - Return default variants when selection is `undefined`
46+
* [#380](https://github.com/seek-oss/vanilla-extract/pull/380) [`3ae2422`](https://github.com/seek-oss/vanilla-extract/commit/3ae24220e2187475561e0be54631558076370fa4) Thanks [@mattcompiles](https://github.com/mattcompiles)! - Return default variants when selection is `undefined`

packages/recipes/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vanilla-extract/recipes",
3-
"version": "0.1.1",
3+
"version": "0.2.0",
44
"description": "Create multi-variant styles with a type-safe runtime API, heavily inspired by https://stitches.dev",
55
"sideEffects": false,
66
"main": "dist/vanilla-extract-recipes.cjs.js",

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2282,7 +2282,7 @@ __metadata:
22822282
resolution: "@fixtures/recipes@workspace:fixtures/recipes"
22832283
dependencies:
22842284
"@vanilla-extract/css": 1.6.0
2285-
"@vanilla-extract/recipes": 0.1.1
2285+
"@vanilla-extract/recipes": 0.2.0
22862286
languageName: unknown
22872287
linkType: soft
22882288

@@ -3898,7 +3898,7 @@ __metadata:
38983898
languageName: unknown
38993899
linkType: soft
39003900

3901-
"@vanilla-extract/recipes@0.1.1, @vanilla-extract/recipes@workspace:packages/recipes":
3901+
"@vanilla-extract/recipes@0.2.0, @vanilla-extract/recipes@workspace:packages/recipes":
39023902
version: 0.0.0-use.local
39033903
resolution: "@vanilla-extract/recipes@workspace:packages/recipes"
39043904
dependencies:

0 commit comments

Comments
 (0)