Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify type of static css prop and dynamic css mixin #257

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

Mad-Kat
Copy link
Collaborator

@Mad-Kat Mad-Kat commented Jan 7, 2025

Fixes #256

  • Unifies static CSS prop and dynamic CSS mixin types.
  • Exports a new type CSSProp that can be used by custom components to receive the css prop in a somewhat typesafe manner

usage:

const MyDivProps = ComponentProps<"div">;

const MyComponent: FunctionComponent<MyDivProps & CSSProp> = (props) =>
   <div {...p}>This spreading works</div>;

Copy link

changeset-bot bot commented Jan 7, 2025

🦋 Changeset detected

Latest commit: 9ea2e6b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
next-yak Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codspeed-hq bot commented Jan 7, 2025

CodSpeed Performance Report

Merging #257 will improve performances by 12.54%

Comparing unify-type-of-static-and-dynamic-css (9ea2e6b) with main (d4379a2)

Summary

⚡ 1 improvements
✅ 1 untouched benchmarks

Benchmarks breakdown

Benchmark main unify-type-of-static-and-dynamic-css Change
render KanjiLetterComponentYak 270.6 ms 240.4 ms +12.54%

@Mad-Kat Mad-Kat marked this pull request as ready for review January 7, 2025 20:14
@Mad-Kat Mad-Kat requested a review from jantimon January 7, 2025 20:14
@Mad-Kat Mad-Kat merged commit 145c621 into main Jan 9, 2025
6 checks passed
@Mad-Kat Mad-Kat deleted the unify-type-of-static-and-dynamic-css branch January 9, 2025 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Type inference issue with complex component type and static css interpolation
2 participants