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

feat(react): propagate additional props #192

Merged
merged 4 commits into from
Jan 28, 2023
Merged

Conversation

TimKolberger
Copy link
Collaborator

Fixed an issue where the factory options type polymorphicFactory<P, Options>() did not propagate
to the factory function poly("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>()
const CustomDiv = poly('div', { 'data-custom-option': 'hello' })

@codecov
Copy link

codecov bot commented Jan 28, 2023

Codecov Report

Merging #192 (6165cee) into main (dd062b4) will decrease coverage by 0.34%.
The diff coverage is 99.58%.

❗ Current head 6165cee differs from pull request most recent head 0654bd0. Consider uploading reports for the commit 0654bd0 to get more accurate results

@@             Coverage Diff             @@
##              main     #192      +/-   ##
===========================================
- Coverage   100.00%   99.66%   -0.34%     
===========================================
  Files            3       11       +8     
  Lines          145      590     +445     
  Branches        10       58      +48     
===========================================
+ Hits           145      588     +443     
- Misses           0        2       +2     
Flag Coverage Δ
preact 100.00% <100.00%> (?)
react 100.00% <100.00%> (?)
solid 100.00% <100.00%> (?)
vue 98.80% <98.80%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/vue/src/use-v-model.ts 96.49% <96.49%> (ø)
packages/preact/src/forwardRef.tsx 100.00% <100.00%> (ø)
packages/preact/src/index.ts 100.00% <100.00%> (ø)
packages/preact/src/polymorphic-factory.tsx 100.00% <100.00%> (ø)
packages/react/src/forwardRef.tsx 100.00% <100.00%> (ø)
packages/react/src/index.ts 100.00% <100.00%> (ø)
packages/react/src/polymorphic-factory.tsx 100.00% <100.00%> (ø)
packages/solid/src/index.ts 100.00% <100.00%> (ø)
packages/solid/src/polymorphic-factory.tsx 100.00% <100.00%> (ø)
packages/vue/src/index.ts 100.00% <100.00%> (ø)
... and 1 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@TimKolberger TimKolberger force-pushed the feat/propagate-options branch from 479dd3f to 6165cee Compare January 28, 2023 14:02
@TimKolberger TimKolberger merged commit bc0f72a into main Jan 28, 2023
@TimKolberger TimKolberger deleted the feat/propagate-options branch January 28, 2023 14:06
@github-actions github-actions bot mentioned this pull request Jan 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant