Skip to content

Commit db47820

Browse files
authored
Create clever-dancers-nail.md
1 parent 3799bae commit db47820

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.changeset/clever-dancers-nail.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
"@primer/components": major
3+
---
4+
5+
Type definitions are now being generated by TypeScript instead of manually maintained. These new type definitions may differ from the previous type definitions and cause breaking changes. If you experience any new TypeScript errors, feel free to create an [issue](https://github.com/primer/components/issues) or reach out in Slack (#design-systems).
6+
7+
### Breaking changes
8+
9+
* The following types are no longer exported:
10+
11+
```
12+
BaseProps
13+
UseDetailsProps
14+
AnchoredPositionHookSettings
15+
AnchorAlignment
16+
AnchorSide
17+
PositionSettings
18+
PaginationHrefBuilder
19+
PaginationPageChangeCallback
20+
PositionComponentProps
21+
```
22+
23+
* Props are now defined with types instead of interfaces which means in some cases you may not be able to create interfaces that `extend` them. To work around this issue, you may need to convert your interfaces to types:
24+
25+
```diff
26+
import {BoxProps} from '@primer/components'
27+
28+
- interface MyFancyBox extends BoxProps {...}
29+
+ type MyFancyBox = BoxProps & {...}
30+
```
31+
32+
* Some components now expect more specific ref types. For example:
33+
34+
```diff
35+
- const ref = React.useRef<HTMLElement>(null)
36+
+ const ref = React.useRef<HTMLButtonElement>(null)
37+
38+
return <Button ref={ref}>...</Button>
39+
```

0 commit comments

Comments
 (0)