-
Notifications
You must be signed in to change notification settings - Fork 14
Allow atoms function in css prop #291
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: d96fa36 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
1f353d6
to
d96fa36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 9 out of 13 changed files in this pull request and generated 1 comment.
Files not reviewed (4)
- packages/docs/content/docs/features.mdx: Language not supported
- packages/example/app/global.css: Language not supported
- packages/yak-swc/yak_swc/tests/fixture/css-prop-invalid/output.dev.stderr: Language not supported
- packages/yak-swc/yak_swc/tests/fixture/css-prop-invalid/output.prod.stderr: Language not supported
if let Callee::Expr(callee) = &call_expr.callee { | ||
if let Expr::Ident(ident) = &**callee { | ||
// If it looks like an atoms function call based on the name, handle it differently | ||
if ident.sym.as_ref() == "atoms" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard-coding the string 'atoms' for function identification may fail if the atoms function is imported using an alias; consider using yak_imports.get_yak_library_name_for_ident(&ident.to_id()) to make the check more robust.
if ident.sym.as_ref() == "atoms" { | |
if yak_imports.get_yak_library_name_for_ident(&ident.to_id()) == "atoms" { |
Copilot uses AI. Check for mistakes.
This closes #290
Completing this PR will add the possibility to use
atoms
directly in the css prop. E.g.