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

Commit 0654bd0

Browse files
committed
docs: update changeset
1 parent 6165cee commit 0654bd0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.changeset/slow-students-peel.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ users.**
1212
type AdditionalProps = Record<never, never>
1313
type Options = { 'data-custom-option': string }
1414

15-
const poly = polymorphicFactory<AdditionalProps, Options>()
15+
const poly = polymorphicFactory<AdditionalProps, Options>({
16+
styled: (component, options) => (props) => {
17+
const Component = props.as || component
18+
return <Component data-custom-styled data-options={JSON.stringify(options)} {...props} />
19+
},
20+
})
1621
const CustomDiv = poly('div', { 'data-custom-option': 'hello' })
1722
```

0 commit comments

Comments
 (0)