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: Use shared Switch component instead of MUISwitch directly #3929

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Nov 8, 2024

What does this PR do?

  • Makes a single Switch component, with label, to be used across PlanX
  • This stops repetition, and should help with drift in other components in future
  • Ensures just switch and label is clickable, not entire row
  • Adds .eslint rule to enforce that the shared component should be imported

Copy link

github-actions bot commented Nov 8, 2024

Removed vultr server and associated DNS entries

@DafyddLlyr DafyddLlyr changed the title dp/standard switch feat: Use shared Switch component instead of MUISwitch directly Nov 11, 2024
Comment on lines +107 to +114
formControlLabelProps={{
sx: {
marginBottom: 0.5,
[`& .${formControlLabelClasses.label}`]: {
fontWeight: FONT_WEIGHT_BOLD,
textTransform: "capitalize",
fontSize: 19,
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switches in these forms are visually different - the label is also really the title of the card.

We could make this a variant, or could attempt to standardise here, but this seemed the best way to handle this initially.

@DafyddLlyr DafyddLlyr requested a review from a team November 11, 2024 10:04
@DafyddLlyr DafyddLlyr marked this pull request as ready for review November 11, 2024 10:04
Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

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

Thanks for picking this one up!

@DafyddLlyr DafyddLlyr merged commit 304490d into main Nov 11, 2024
12 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/standard-switch branch November 11, 2024 17: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.

2 participants