Skip to content

Commit fa9ed89

Browse files
authored
Merge pull request #1116 from primer/changeset-release/main
Release Tracking
2 parents c25d28b + ce52b50 commit fa9ed89

File tree

5 files changed

+73
-77
lines changed

5 files changed

+73
-77
lines changed

.changeset/fair-feet-know.md

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

.changeset/olive-donuts-wink.md

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

.changeset/swift-ducks-draw.md

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

CHANGELOG.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,77 @@
11
# @primer/components
22

3+
## 25.0.0
4+
5+
### Major Changes
6+
7+
- [`8799f74a`](https://github.com/primer/components/commit/8799f74ad69911e9840d51a65d08237f3cb1f172) [#1112](https://github.com/primer/components/pull/1112) Thanks [@colebemis](https://github.com/colebemis)! - Primer React now supports color modes! 🎉
8+
9+
See the new [Theming](https://primer.style/components/theming) documentation for more details.
10+
11+
#### Breaking changes
12+
13+
- You'll need to replace the `ThemeProvider` from `styled-components` with the new Primer React `ThemeProvider`:
14+
15+
```diff
16+
- import {ThemeProvider} from 'styled-components'
17+
- import {theme} from '@primer/components
18+
+ import {ThemeProvider} from '@primer/components'
19+
20+
function App() {
21+
return (
22+
- <ThemeProvider theme={theme}>
23+
+ <ThemeProvider>
24+
<div>your app here...</div>
25+
</ThemeProvider>
26+
)
27+
}
28+
```
29+
30+
- The structure of the theme object has changed to support color schemes:
31+
32+
```diff
33+
const theme = {
34+
- colors,
35+
- shadows,
36+
+ colorSchemes: {
37+
+ light: {
38+
+ colors,
39+
+ shadows,
40+
+ },
41+
+ dark: {...},
42+
+ dark_dimmed: {...},
43+
+ },
44+
space,
45+
fonts,
46+
fontSizes,
47+
fontWeights,
48+
lineHeights,
49+
borderWidths,
50+
radii,
51+
breakpoints,
52+
sizes,
53+
}
54+
```
55+
56+
- The `theme.colors` and `theme.shadows` objects are no longer available from the `theme` export. Use the `useTheme`hook instead:
57+
58+
```diff
59+
- import {theme} from '@primer/components'
60+
+ import {useTheme} from '@primer/components'
61+
62+
function Example() {
63+
+ const {theme} = useTheme()
64+
const myColor = theme.colors.text.primary
65+
...
66+
}
67+
```
68+
69+
### Patch Changes
70+
71+
- [`360e3595`](https://github.com/primer/components/commit/360e3595a6e133e8caf391e7355f25b856936b12) [#1111](https://github.com/primer/components/pull/1111) Thanks [@VanAnderson](https://github.com/VanAnderson)! - Update color variable used in ProgressBar (`state.success``bg.successInverse`)
72+
73+
* [`1b3d87d2`](https://github.com/primer/components/commit/1b3d87d27103b99dd02cbf61f88d93b7df80d5b1) [#1127](https://github.com/primer/components/pull/1127) Thanks [@VanAnderson](https://github.com/VanAnderson)! - Bump @primer/primitives from 0.0.0-20211167520 to 0.0.0-20212178221
74+
375
## 24.0.0
476

577
### Major Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@primer/components",
3-
"version": "24.0.0",
3+
"version": "25.0.0",
44
"description": "Primer react components",
55
"main": "lib/index.js",
66
"module": "lib-esm/index.js",

0 commit comments

Comments
 (0)