Skip to content

Commit

Permalink
Create clever-dancers-nail.md
Browse files Browse the repository at this point in the history
  • Loading branch information
colebemis authored Apr 1, 2021
1 parent 3799bae commit db47820
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .changeset/clever-dancers-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
"@primer/components": major
---

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).

### Breaking changes

* The following types are no longer exported:

```
BaseProps
UseDetailsProps
AnchoredPositionHookSettings
AnchorAlignment
AnchorSide
PositionSettings
PaginationHrefBuilder
PaginationPageChangeCallback
PositionComponentProps
```

* 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:

```diff
import {BoxProps} from '@primer/components'

- interface MyFancyBox extends BoxProps {...}
+ type MyFancyBox = BoxProps & {...}
```

* Some components now expect more specific ref types. For example:

```diff
- const ref = React.useRef<HTMLElement>(null)
+ const ref = React.useRef<HTMLButtonElement>(null)

return <Button ref={ref}>...</Button>
```

0 comments on commit db47820

Please sign in to comment.