Skip to content

Commit 5704484

Browse files
committed
Fix printed tab header padding
1 parent 78a6bc9 commit 5704484

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/app/components/content/IsaacCodeSnippet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const IsaacCodeSnippet = ({doc}: IsaacCodeProps) => {
5757
{doc.url && <Row>
5858
<Col className="text-center mb-2">
5959
<a className="no-print" href={doc.url} onClick={logViewOnGitHub} target="_blank" rel="noopener noreferrer">View on GitHub</a>
60-
<a className="only-print mb-2" href={doc.url} target="_blank" rel="noopener noreferrer">{doc.url}</a>
60+
<a className="only-print" href={doc.url} target="_blank" rel="noopener noreferrer">{doc.url}</a>
6161
</Col>
6262
</Row>}
6363
</>;

src/app/components/elements/Tabs.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ export const Tabs = (props: TabsProps) => {
145145
{Object.entries(children).map(([tabTitle, tabBody], mapIndex) => {
146146
const tabIndex = mapIndex + 1;
147147
return <>
148-
{style === "tabs" && <TabNavbar {...props} className="d-none d-print-flex" activeTab={tabIndex} changeTab={changeTab}>{children}</TabNavbar>}
148+
{/* This navbar exists only when printing so each tab has its own heading */}
149+
{style === "tabs" && <TabNavbar {...props} className={classNames("d-none d-print-flex mb-3 mt-2", {"mt-n4": mapIndex === 0 && tabContentClass.includes("pt-4")})} activeTab={tabIndex} changeTab={changeTab}>{children}</TabNavbar>}
149150
<TabPane key={tabTitle} tabId={tabIndex}>
150151
{tabBody as ReactNode}
151152
</TabPane>

0 commit comments

Comments
 (0)