diff --git a/components/parameter-table/ChildBodyParametersRows.module.scss b/components/parameter-table/ChildBodyParametersRows.module.scss new file mode 100644 index 0000000000..dd2631c562 --- /dev/null +++ b/components/parameter-table/ChildBodyParametersRows.module.scss @@ -0,0 +1,21 @@ +.childBodyParametersRows { + details tr { + border-top: none; + } + + // Remove any default markdown article padding for property cells + details tr td { + padding-bottom: 0.25rem; + } + + // Set the left border for in the nested property tables. Also need to override + // a default markdown file style that sets a table's font size based on + // percentage which would cause the table font size to shrink more and more + // as the properties nested more and more. + td { + table { + border-left: 4px solid var(--color-border-muted); + font-size: inherit !important; + } + } +} diff --git a/components/rest/ChildBodyParametersRows.tsx b/components/parameter-table/ChildBodyParametersRows.tsx similarity index 63% rename from components/rest/ChildBodyParametersRows.tsx rename to components/parameter-table/ChildBodyParametersRows.tsx index 959fb45ed5..6684846f4b 100644 --- a/components/rest/ChildBodyParametersRows.tsx +++ b/components/parameter-table/ChildBodyParametersRows.tsx @@ -1,7 +1,11 @@ +import cx from 'classnames' + import { useTranslation } from 'components/hooks/useTranslation' import { ParameterRow } from './ParameterRow' import type { ChildParameter } from './types' +import styles from './ChildBodyParametersRows.module.scss' + type Props = { slug: string childParamsGroups: ChildParameter[] @@ -15,27 +19,23 @@ export function ChildBodyParametersRows({ parentType, childParamsGroups, }: Props) { - const { t } = useTranslation('products') + const { t } = useTranslation(['parameter_table', 'products']) return ( - + -
-