Skip to content

Commit

Permalink
fix(odyssey-react-mui): make figcaption styles a fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
edburyenegren-okta committed Jan 30, 2023
1 parent 616cb2e commit a4a232a
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions packages/odyssey-react-mui/src/theme/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -625,15 +625,22 @@ export const components: ThemeOptions["components"] = {
display: "grid",
gridGap: theme.spacing(2),
gridTemplateColumns: "minmax(min-content, max-content)",
justifyContent: "center",
justifyItems: "center",
justifyContent: "start",
justifyItems: "start",
marginBlockStart: 0,
marginBlockEnd: theme.spacing(4),
marginInline: 0,

figcaption: {
color: theme.palette.text.secondary,
fontSize: theme.typography.body1.fontSize,
"&:last-child": {
marginBlockEnd: 0,
},
},

"figcaption:not([class])": {
color: theme.palette.text.secondary,
fontSize: theme.typography.body1.fontSize,
},

hr: {
marginBlock: theme.spacing(2),
marginInline: 0,
Expand Down Expand Up @@ -1453,6 +1460,16 @@ export const components: ThemeOptions["components"] = {
...(ownerState.stickyHeader && {
borderCollapse: "separate",
}),

caption: {
clip: "rect(0 0 0 0)",
clipPath: "inset(50%)",
height: "1px",
overflow: "hidden",
position: "absolute",
whiteSpace: "nowrap",
width: "1px",
},
}),
},
},
Expand Down Expand Up @@ -1549,6 +1566,9 @@ export const components: ThemeOptions["components"] = {
},
},
MuiTableContainer: {
defaultProps: {
component: "figure",
},
styleOverrides: {
root: ({ theme }) => ({
width: "unset",
Expand Down

0 comments on commit a4a232a

Please sign in to comment.