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

Unify Radio, Check Box, Switch #9009

Open
1 of 2 tasks
danielchalmers opened this issue May 19, 2024 · 1 comment
Open
1 of 2 tasks

Unify Radio, Check Box, Switch #9009

danielchalmers opened this issue May 19, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@danielchalmers
Copy link
Contributor

Feature request type

Enhance component

Component name

No response

Is your feature request related to a problem?

The Radio, Check Box, and Switch are all similar components but have very different implementations, leading to many differences.

Style

Placed together, the Check Box sticks out:

image

Right-to-left is even worse:

image

Code

MudCheckBox and MudSwitch are MudFormComponents but MudRadio isn't.

MudRadio can be placed in many more ways using the Placement enum:

.AddClass($"mud-radio-content-placement-{ConvertPlacement(Placement).ToDescriptionString()}")

than MudCheckBox:

.AddClass("flex-row-reverse", LabelPosition == LabelPosition.Start)

or MudSwitch:

.AddClass(LabelPosition == LabelPosition.End ? "" : "flex-row-reverse", true)

Describe the solution you'd like

Code and styles should be unified much further so they all work together as expected and feel like cohesive controls.
It should be explored if they can derive from a shared class.

All should align properly:

image

All should have Placement property instead of LabelPosition for more advanced aliginment.

Have you seen this feature anywhere else?

No response

Describe alternatives you've considered

No response

Pull Request

  • I would like to do a Pull Request

Code of Conduct

  • I agree to follow this project's Code of Conduct
@danielchalmers
Copy link
Contributor Author

Not aligned in the DataGrid Sorting example:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant