Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit a394810

Browse files
committed
docs: add types
1 parent d3dbb96 commit a394810

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/react/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ It still supports the `as` prop, which would replace the `OriginalComponent`.
9090
// renders <div />
9191
```
9292

93+
## Types
94+
95+
```ts
96+
import type { HTMLPolymorphicComponents, HTMLPolymorphicProps } from '@polymorphic-factory/react'
97+
98+
type PolymorphicDiv = HTMLPolymorphicComponents['div']
99+
type DivProps = HTMLPolymorphicProps<'div'>
100+
```
101+
93102
## License
94103
95104
MIT © [Tim Kolberger](https://github.com/timkolberger)

0 commit comments

Comments
 (0)