@vertigis/react-ui 9.2.1 → 9.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/styles/createTheme.js +37 -0
package/package.json
CHANGED
package/styles/createTheme.js
CHANGED
|
@@ -465,6 +465,31 @@ function getOverrides(theme) {
|
|
|
465
465
|
},
|
|
466
466
|
},
|
|
467
467
|
MuiListItem: {
|
|
468
|
+
styleOverrides: {
|
|
469
|
+
root: {
|
|
470
|
+
"&.MuiListItem-secondaryAction, &>.MuiListItemButton-root": {
|
|
471
|
+
// Disable the right padding of 48px that MUI uses
|
|
472
|
+
// to make room for secondary actions, since we use
|
|
473
|
+
// flex for those rather than absolute positioning
|
|
474
|
+
// (see MuiListItemSecondaryAction overrides). Note
|
|
475
|
+
// that there are two distinct cases we need to
|
|
476
|
+
// handle, depending on whether a
|
|
477
|
+
// <ListItemSecondaryAction> element is used
|
|
478
|
+
// explicitly, or whether the ListItem's
|
|
479
|
+
// `secondaryAction` prop is used.
|
|
480
|
+
paddingRight: spacing(1),
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
container: {
|
|
484
|
+
// A wrapper element with this class is added around a
|
|
485
|
+
// list item when a <ListItemSecondaryAction> child is
|
|
486
|
+
// present. Use flex to position the secondary actions
|
|
487
|
+
// next to the list item content rather than absolute
|
|
488
|
+
// positioning so that nothing overlaps.
|
|
489
|
+
display: "flex",
|
|
490
|
+
alignItems: "center",
|
|
491
|
+
},
|
|
492
|
+
},
|
|
468
493
|
variants: [
|
|
469
494
|
{
|
|
470
495
|
// HACK: The button prop is deprecated in MUI 5 in favor
|
|
@@ -478,6 +503,18 @@ function getOverrides(theme) {
|
|
|
478
503
|
},
|
|
479
504
|
],
|
|
480
505
|
},
|
|
506
|
+
MuiListItemSecondaryAction: {
|
|
507
|
+
styleOverrides: {
|
|
508
|
+
root: {
|
|
509
|
+
// We use flex instead of absolute positioning so that
|
|
510
|
+
// secondary buttons don't overlap the item text.
|
|
511
|
+
position: "static",
|
|
512
|
+
transform: "unset",
|
|
513
|
+
flex: "0 0 auto",
|
|
514
|
+
paddingRight: spacing(1),
|
|
515
|
+
},
|
|
516
|
+
},
|
|
517
|
+
},
|
|
481
518
|
MuiListItemText: {
|
|
482
519
|
styleOverrides: {
|
|
483
520
|
primary: {
|