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

Remove useStyles, refactor into StyledComponents and sx #2606

Closed
Tracked by #2595
Tymek opened this issue Dec 6, 2022 · 5 comments
Closed
Tracked by #2595

Remove useStyles, refactor into StyledComponents and sx #2606

Tymek opened this issue Dec 6, 2022 · 5 comments

Comments

@Tymek
Copy link
Member

Tymek commented Dec 6, 2022

useStyles/makeStyles() is deprecated (See: https://mui.com/system/styles/basics/).

We need to migrate to styled, or where it makes sense use sx while keeping in mind performance tradeoffs.

Examples

New syntax: https://github.com/Unleash/unleash/blob/228ddabf73411ce8837824de1e15fe58659896a8/frontend/src/component/addons/AddonForm/AddonForm.styles.tsx

Old syntax: https://github.com/Unleash/unleash/blob/228ddabf73411ce8837824de1e15fe58659896a8/frontend/src/component/admin/apiToken/ApiTokenForm/ApiTokenForm.styles.ts

@asharonbaltazar
Copy link

Hey, @Tymek, can I take a shot at this? Seems like a good first issue to orient myself with the codebase.

@Tymek
Copy link
Member Author

Tymek commented Dec 7, 2022

This can be worked on by multiple people. Pick couple of files, let us know in the comment, and go for it! :) Once small initial contribution is reviewed you can choose to do another batch, that's how I see it.

@ShaswatPrabhat
Copy link
Contributor

Picking up: frontend/src/component/admin/users/UserForm/UserForm.styles.ts

Will share PR shortly

@ShaswatPrabhat
Copy link
Contributor

Please find the PR UserForm.tsx

@stale
Copy link

stale bot commented Jan 6, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 6, 2023
@stale stale bot closed this as completed Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants