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

feat(dossier): secondary cards #8

Merged
merged 9 commits into from
Nov 29, 2023

Conversation

aaadryyy
Copy link
Collaborator

Refactoring of the left panel in the Dossier page.

  • new CardLayout component to handle similar aspects between cards (now still in the folders folder as it is unclear if those card will be used elsewhere)
  • refactoring of the left panel cards according to the CardLayout
  • new icons used in the panel
  • theme update to have a secondary button styling
Screenshot 2023-11-29 at 00 10 18

button: {
fontSize: 12,
fontWeight: 700,
textTransform: "none",
Copy link
Collaborator Author

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...)?

Copy link
Collaborator

@alexfauquette alexfauquette Nov 29, 2023

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

Copy link
Collaborator Author

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).

Copy link
Collaborator

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

Copy link
Collaborator Author

@aaadryyy aaadryyy Nov 29, 2023

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.

@aaadryyy aaadryyy merged commit ffd69dd into master Nov 29, 2023
2 checks passed
@aaadryyy aaadryyy changed the title Page dossier preview secondary cards feat(dossier): secondary cards Nov 29, 2023
@aaadryyy aaadryyy deleted the page-dossier-preview-secondary-cards branch November 30, 2023 21:18
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.

3 participants