diff --git a/docs/src/modules/components/ApiPage/table/ClassesTable.tsx b/docs/src/modules/components/ApiPage/table/ClassesTable.tsx index aa62403018b8cf..63d716f2bd1d43 100644 --- a/docs/src/modules/components/ApiPage/table/ClassesTable.tsx +++ b/docs/src/modules/components/ApiPage/table/ClassesTable.tsx @@ -7,10 +7,16 @@ import { brandingLightTheme as lightTheme, } from 'docs/src/modules/brandingTheme'; import { getHash } from 'docs/src/modules/components/ApiPage/list/ClassesList'; +import StyledTableContainer from 'docs/src/modules/components/ApiPage/table/StyledTableContainer'; const StyledTable = styled('table')( ({ theme }) => ({ textAlign: 'left', + // Override docs/src/modules/components/MarkdownElement styles + '&&': { + display: 'table', + width: '100%', + }, '& .class-name': { flexShrink: 0, fontWeight: theme.typography.fontWeightSemiBold, @@ -53,35 +59,39 @@ interface ClassesTableProps { export default function ClassesTable(props: ClassesTableProps) { const { classes, componentName, displayClassKeys } = props; return ( - - - - Class name - {displayClassKeys && Rule name} - Description - - - - {classes.map((params) => { - const { className, key, description, isGlobal } = params; + + + + + Class name + {displayClassKeys && Rule name} + Description + + + + {classes.map((params) => { + const { className, key, description, isGlobal } = params; - return ( - - - .{className} - - {displayClassKeys && {!isGlobal && {key}}} - - - - - ); - })} - - + return ( + + + .{className} + + {displayClassKeys && ( + {!isGlobal && {key}} + )} + + + + + ); + })} + + + ); } diff --git a/docs/src/modules/components/ApiPage/table/PropertiesTable.tsx b/docs/src/modules/components/ApiPage/table/PropertiesTable.tsx index 320781d92491a4..12db811303764d 100644 --- a/docs/src/modules/components/ApiPage/table/PropertiesTable.tsx +++ b/docs/src/modules/components/ApiPage/table/PropertiesTable.tsx @@ -16,6 +16,11 @@ import StyledTableContainer from 'docs/src/modules/components/ApiPage/table/Styl const StyledTable = styled('table')( ({ theme }) => ({ + // Override docs/src/modules/components/MarkdownElement styles + '&&': { + display: 'table', + width: '100%', + }, '& .type-column': { minWidth: '20%', }, diff --git a/docs/src/modules/components/ApiPage/table/SlotsTable.tsx b/docs/src/modules/components/ApiPage/table/SlotsTable.tsx index 9ea3f9fb4e5c43..8b2bf8e7176166 100644 --- a/docs/src/modules/components/ApiPage/table/SlotsTable.tsx +++ b/docs/src/modules/components/ApiPage/table/SlotsTable.tsx @@ -11,6 +11,11 @@ import StyledTableContainer from 'docs/src/modules/components/ApiPage/table/Styl const StyledTable = styled('table')( ({ theme }) => ({ + // Override docs/src/modules/components/MarkdownElement styles + '&&': { + display: 'table', + width: '100%', + }, '& .slot-name': { fontFamily: theme.typography.fontFamilyCode, fontWeight: theme.typography.fontWeightSemiBold, diff --git a/docs/src/modules/components/ApiPage/table/StyledTableContainer.tsx b/docs/src/modules/components/ApiPage/table/StyledTableContainer.tsx index 4abdd6cc7c10f2..a9be6a2fa5150a 100644 --- a/docs/src/modules/components/ApiPage/table/StyledTableContainer.tsx +++ b/docs/src/modules/components/ApiPage/table/StyledTableContainer.tsx @@ -4,7 +4,7 @@ import { brandingDarkTheme as darkTheme } from 'docs/src/modules/brandingTheme'; const StyledTableContainer = styled('div')( ({ theme }) => ({ borderRadius: 12, - overflow: 'hidden', + overflowX: 'auto', '& table': { marginLeft: -1, marginRight: -1,