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

Enable css props on styled components #243

Merged
merged 4 commits into from
Dec 19, 2024

Conversation

Mad-Kat
Copy link
Collaborator

@Mad-Kat Mad-Kat commented Dec 19, 2024

This was noticed in #240

This change alters the public API of styled components e.g. styled.div or styled.p to accept an optional CSS property the same way as native elements do with our JSX definition.

This works now without a type error:

const Text = styled.p`
  font-size: 20px;
  font-weight: bold;
  font-family: "Inter";
`;

<Text
      css={css`
        color: red;
      `}
    >
      test
    </Text>

Copy link

changeset-bot bot commented Dec 19, 2024

🦋 Changeset detected

Latest commit: 55f0e2b

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

This PR includes changesets to release 2 packages
Name Type
next-yak Patch
yak-swc 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 Dec 19, 2024

CodSpeed Performance Report

Merging #243 will not alter performance

Comparing enable-css-props-on-styled-components (55f0e2b) with main (605230e)

Summary

✅ 2 untouched benchmarks

@Mad-Kat Mad-Kat marked this pull request as ready for review December 19, 2024 07:58
@jantimon jantimon self-requested a review December 19, 2024 08:25
jantimon
jantimon previously approved these changes Dec 19, 2024
.changeset/angry-dingos-remain.md Outdated Show resolved Hide resolved
@Mad-Kat Mad-Kat merged commit 5ce7f16 into main Dec 19, 2024
8 checks passed
@Mad-Kat Mad-Kat deleted the enable-css-props-on-styled-components branch December 19, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants