-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat(dossier): secondary cards #8
Conversation
components/ThemeRegistry/theme.ts
Outdated
button: { | ||
fontSize: 12, | ||
fontWeight: 700, | ||
textTransform: "none", |
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.
@alexfauquette any idea how to remove uppercase on secondary buttons but keep it on the others (primary, tabs...)?
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.
You can apply this style to the className containedSecondary
class: https://mui.com/material-ui/api/button/#Button-css-containedSecondary It exists also for the other variants
Then maybe better to move this textTransform
to the style override
https://mui.com/material-ui/customization/theme-components/#theme-style-overrides
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.
So should I also move the fontSize
and fontWeight
in the style override?
I am not sure how to style the containedSecondary
className properly (other than in a .css file).
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.
You have multiple choices
https://mui.com/material-ui/customization/theme-components/#theme-style-overrides
Usually you can write a CSS selector as a key, using &
to target the current element.
As an example, you have in the codebase the following code. The same type of property can be use in styleOverride
sx={{
[`& .${timelineOppositeContentClasses.root}`]: {
flex: 0.2,
},
}}
But I found an easier one for your issue. I just commit
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.
Nice!
I added the fontSize
and fontWeight
to the fonction in the following commit 👇 .
It felt weird not to use the global theme for buttons, as those will (probably) be reused everywhere.
Refactoring of the left panel in the Dossier page.
folders
folder as it is unclear if those card will be used elsewhere)