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

Version Packages #193

Merged
merged 1 commit into from
Jan 28, 2023
Merged

Version Packages #193

merged 1 commit into from
Jan 28, 2023

Conversation

github-actions[bot]
Copy link
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@polymorphic-factory/preact@0.2.0

Minor Changes

  • #192 bc0f72a Thanks @TimKolberger! - 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>({
      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' })

@polymorphic-factory/react@0.3.0

Minor Changes

  • #192 bc0f72a Thanks @TimKolberger! - 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>({
      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' })

@polymorphic-factory/solid@0.2.0

Minor Changes

  • #192 bc0f72a Thanks @TimKolberger! - 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>({
      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' })

@TimKolberger TimKolberger merged commit 0a493a1 into main Jan 28, 2023
@TimKolberger TimKolberger deleted the changeset-release/main branch January 28, 2023 14:11
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