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

[xplat] Initial implementation of griffel-to-stylex converter #30754

Merged
merged 5 commits into from
Mar 12, 2024

Conversation

behowell
Copy link
Contributor

New Behavior

Adds an initial implementation of a converter from griffel to stylex. This will enable existing web styles to be reused on native.

@behowell behowell self-assigned this Mar 10, 2024
@github-actions github-actions bot added this to the March Project Cycle Q1 2024 milestone Mar 10, 2024
@behowell behowell marked this pull request as ready for review March 12, 2024 18:48
@behowell behowell requested review from a team as code owners March 12, 2024 18:48
Copy link

@JasonVMo JasonVMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not doing a detailed review now, overall the changes look good and it will be good to get them in the branch where we can iterate on them further.

@@ -38,7 +38,9 @@
"@fluentui/react-theme": "^9.1.17",
"@fluentui/react-utilities": "^9.18.3",
"@griffel/react": "^1.5.14",
"@swc/helpers": "^0.5.1"
"@stylexjs/stylex": "0.5.0-alpha.4",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are only calling stylex.create from the native side I don't think you need to bring it in directly. I believe you can call it via:

import { css } from 'react-strict-dom';
const styles = css.create(...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually looks like you already saw this below. I think they added TS support to RSD just recently, might be in 0.0.3, so if this is for types you may want to try updating to that build.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge it as it is for now and we can look at switching over to the RSD types once we update to 0.0.3

@behowell behowell merged commit f052a48 into microsoft:xplat Mar 12, 2024
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants