Skip to content

Commit

Permalink
address top padding for "smaller" headings
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Jan 23, 2024
1 parent 8510c18 commit 119d3d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/shared/ApiDoc/Heading.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ export function ApiDocHeading({
</Heading>
);

return <Box pt="4">{heading}</Box>;
return (
<Box pt={typeof headingLevel === "number" && headingLevel <= 4 ? 4 : 0}>
{heading}
</Box>
);
}
ApiDocHeading.propTypes = {
canonicalReference: PropTypes.string.isRequired,
Expand Down

0 comments on commit 119d3d9

Please sign in to comment.