Migrate Kyper ChevronRight Icon to MXUI - #357
Conversation
| > | ||
| {__('Other available data')} | ||
| <ChevronRight style={styles.chevron} /> | ||
| <Icon name="chevron_right" size={16} sx={{ ml: 0.5 }} /> |
There was a problem hiding this comment.
This icon is inside a Link component which is already a flex row.
| > | ||
| {__('Data requested')} | ||
| <ChevronRight style={styles.chevron} /> | ||
| <Icon name="chevron_right" size={16} sx={{ marginLeft: 0.5 }} /> |
| {_p('connect/disclosure/policy/link', 'MX Privacy Policy')} | ||
|
|
||
| <ChevronRight style={styles.chevron} /> | ||
| <Icon name="chevron_right" size={16} sx={{ marginLeft: 0.5 }} /> |
| > | ||
| <PoweredByMXText /> | ||
| <ChevronRight style={styles.chevron} /> | ||
| <Icon name="chevron_right" size={24} sx={{ marginLeft: '6px' }} /> |
There was a problem hiding this comment.
Same here. It's inside a Button that's a centered flex row out of the box.
| styleOverrides: { | ||
| // MUI sizes icon slot children off the button size (medium 20px, large 22px), | ||
| // which beats the Icon's own size prop. Our chevrons are always 24px. | ||
| endIcon: { |
There was a problem hiding this comment.
If we are choosing to change this, then shouldn't we change it at the MXUI level? @platypus801
There was a problem hiding this comment.
I can make this a local fix instead of a global one. I added it to the global override because both places using endIcon currently need it to be 24px, so it seemed reasonable to handle it globally.
The issue occurs when you set the endIcon size differently from MUI’s default icon size for the button (18/20/22px for small/medium/large). MUI’s size takes precedence, so you end up with 20px instead of the 24px you want. To me, this feels more like an MUI issue than an MXUI issue.
Before(Kyper)
After(MXUI)