Skip to content

Commit cd7a7be

Browse files
committed
Update Changelog (v10.6.0)
1 parent ea195bf commit cd7a7be

1 file changed

Lines changed: 33 additions & 2 deletions

File tree

changelog.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,37 @@ Since you are interested in what happens next, in case, you work for a for-profi
44

55
---
66

7-
### Bug fixes
7+
## 10.6.0 (2021-03-11)
88

99
### Improvements
1010

11+
- [jss] `Styles` now supports `ClassNames`, `Props`/`Data`, and `Theme` as type parameters (eg. `Styles<Names, Data, Theme>`). [1460](https://github.com/cssinjs/jss/pull/1460)
12+
- [react-jss] `withStyles` and `createUseStyles` now support `ClassNames`, `Props`, and `Theme` as type parameters (eg. `createUseStyles<Names, Props, Theme>`). [1460](https://github.com/cssinjs/jss/pull/1460)
13+
- [react-jss] `useStyles` finally expects the correct argument type: a `Props` object with an optional `Theme` property (both determined from `createUseStyles`). [1460](https://github.com/cssinjs/jss/pull/1460)
14+
15+
### Breaking Changes
16+
17+
- [react-jss] `Theme` is no longer the first generic type parameter for `createUseStyles`. [1460](https://github.com/cssinjs/jss/pull/1460)
18+
- There are two main ways to tell TypeScript your `Theme`'s type without reaching over the other type parameters:
19+
20+
Using the function argument. (Recommended)
21+
22+
```typescript
23+
const useStyles = createUseStyles(theme: Theme => ({
24+
className: { /* ... */ };
25+
}));
26+
```
27+
28+
Using the object argument with a function. (You will only need to specify the `Theme` type once.)
29+
30+
```typescript
31+
const useStyles = createUseStyles({
32+
className: ({theme}: {theme: Theme}) => ({
33+
/* ... */
34+
})
35+
})
36+
```
37+
1138
## 10.5.1 (2021-1-23)
1239

1340
### Bug fixes
@@ -34,7 +61,7 @@ Since you are interested in what happens next, in case, you work for a for-profi
3461
- [*] Remove test files from the package [1406](https://github.com/cssinjs/jss/pull/1406)
3562
- [*] Upgrade rollup [1426](https://github.com/cssinjs/jss/pull/1426)
3663
- [*] Upgrade flow to 0.138.0 [1425](https://github.com/cssinjs/jss/pull/1425)
37-
- [jss-plugin-default-unit] aAdd gap unit [1403](https://github.com/cssinjs/jss/pull/1403)
64+
- [jss-plugin-default-unit] Add gap unit [1403](https://github.com/cssinjs/jss/pull/1403)
3865
- [jss-plugin-default-unit] Add default units to logical properties [1415](https://github.com/cssinjs/jss/pull/1415)
3966
- [jss] Improve deleteRule() performance [1424](https://github.com/cssinjs/jss/pull/1424)
4067

@@ -436,3 +463,7 @@ Republish of alpha 5 with properly building the code.
436463
- [jss-plugin-vendor-prefixer](https://github.com/cssinjs/jss-vendor-prefixer/blob/master/changelog.md)
437464
- [jss-preset-default](https://github.com/cssinjs/jss-preset-default/blob/master/changelog.md)
438465
- [react-jss](./docs/react-jss.md/blob/master/changelog.md)
466+
467+
```
468+
469+
```

0 commit comments

Comments
 (0)