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

🎨 Pass className to root #3648

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

arkadiy93
Copy link
Contributor

@arkadiy93 arkadiy93 commented Oct 7, 2024

Like in EDS, we are also using styled components.
It would be nice to be able to pass the className prop to the root to have more control of the styles.

https://styled-components.com/docs/basics#styling-any-component

@oddvernes
Copy link
Collaborator

I see that we are not passing {...rest} props either which is where className and style is normally inlcuded. I'm not sure why there is a className there already since it is unused, but perhaps we need to keep it now that it has been published and possibly used by people.
I think we should pass {...rest} as well (+ need to extend type with & HTMLAttributes<HTMLDivElement>). Note that we pass some styles required for enableVirtual that should not be interferred with so maybe style should be left as is 🤷

Copy link
Collaborator

@oddvernes oddvernes left a comment

Choose a reason for hiding this comment

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

LGTM!

@oddvernes oddvernes merged commit 3ba62d5 into equinor:develop Oct 9, 2024
4 of 6 checks passed
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