This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
github-actions
released this
28 Jan 14:12
·
430 commits
to main
since this release
Minor Changes
-
#192
bc0f72a
Thanks @TimKolberger! - Fixed an issue where the factory options typepolymorphicFactory<P, Options>()
did not propagate
to the factory functionpoly("div", options)
. This is possibly a breaking change for TypeScript
users.type AdditionalProps = Record<never, never> type Options = { 'data-custom-option': string } const poly = polymorphicFactory<AdditionalProps, Options>({ styled: (component, options) => (props) => { const Component = props.as || component return <Component data-custom-styled data-options={JSON.stringify(options)} {...props} /> }, }) const CustomDiv = poly('div', { 'data-custom-option': 'hello' })