-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[Joy] Miscellaneous fixes #33750
[Joy] Miscellaneous fixes #33750
Conversation
siriwatknp
commented
Aug 2, 2022
•
edited
Loading
edited
- Found styling issues and improvements from building [Experiment] Add Joy variant studio #33680
- Add more demos and examples
- I have followed (at least) the PR section of the contributing guide.
@mui/joy: parsed: +0.73% , gzip: +0.25% |
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.
Great changes! Just a few copywriting tweaks.
@@ -93,3 +93,9 @@ Since links are the most appropriate component for navigating through pages, tha | |||
Doing so will automatically change the rendered HTML tag from `<button>` to `<a>`. | |||
|
|||
{{"demo": "ButtonLink.js"}} | |||
|
|||
## CSS Variables | |||
|
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.
Play around with all the CSS variables available in the slider component to see how the design changes. | |
You can use those to customize the component on both the `sx` prop and the theme. |
Just so we have consistent pages throughout!
@@ -77,6 +77,10 @@ The `ListDivider` component comes with four `inset` patterns: | |||
|
|||
{{"demo": "DividedList.js"}} | |||
|
|||
For horizontal list, only `inset="gutter"` works on list divider. |
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.
For horizontal list, only `inset="gutter"` works on list divider. | |
When in a horizontal list, the only available pattern for the divider is `inset="gutter"`. |
@@ -117,9 +117,15 @@ Visit the [WAI-ARIA documentation](https://www.w3.org/WAI/ARIA/apg/patterns/radi | |||
|
|||
## Common examples | |||
|
|||
### Alignment buttons | |||
|
|||
Simply provide an icon as a label to the `Radio` to make the radio buttons concise. You need to provide `aria-label` to the input slot for users who rely on screen readers. |
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.
Simply provide an icon as a label to the `Radio` to make the radio buttons concise. You need to provide `aria-label` to the input slot for users who rely on screen readers. | |
For this example, we're using an icon as a label making the `Radio` component concise. | |
Note that we're also using a meaningful `aria-label` on the input slot, ensuring proper accessibility. |
### Payment methods | ||
|
||
Mix raddio buttons with the [`List`](/joy-ui/react-list/)-related components to create a commonly seen vertical or horizontal payment method list. | ||
Mix radio buttons with the [`List`](/joy-ui/react-list/)-related components to create a commonly seen vertical or horizontal payment method list. |
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.
Mix radio buttons with the [`List`](/joy-ui/react-list/)-related components to create a commonly seen vertical or horizontal payment method list. | |
In this example, we mixed radio buttons with [`List`](/joy-ui/react-list/)-related components to create a vertical or horizontal radio button list, commonly seen in payment method sort of forms. |
@@ -47,6 +47,12 @@ To make the thumb label always visible, toggle on the `valueLabelDisplay` prop. | |||
|
|||
{{"demo": "AlwaysVisibleLabelSlider.js"}} | |||
|
|||
### Vertical | |||
|
|||
Set `orientation="vertical"` to display the vertical slider. |
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.
Set `orientation="vertical"` to display the vertical slider. | |
To display the slider vertically, use the `orientation` prop with `vertical` as the value. |