Skip to content

Commit 1be86b9

Browse files
fix: fixed typography, display and links sections
1 parent 70673e4 commit 1be86b9

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

www/src/components/_doc-elements.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,3 +342,19 @@
342342
grid-template-columns: repeat(4, 1fr); // 4 columns for large+ screens
343343
}
344344
}
345+
346+
.pgn-doc__code-display-block,
347+
.pgn-doc__code-headings-block {
348+
.pgn__data-table-cell-wrap {
349+
max-width: max-content;
350+
}
351+
352+
@media (--pgn-size-breakpoint-max-width-md) {
353+
overflow: hidden;
354+
overflow-x: scroll;
355+
356+
.pgn__data-table-layout-wrapper {
357+
overflow-x: initial;
358+
}
359+
}
360+
}

www/src/components/typography-page/Display.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function Display() {
1010
return (
1111
<>
1212
<h2 className="mb-2">Display</h2>
13-
<div className="mb-4">
13+
<div className="mb-4 pgn-doc__code-display-block">
1414
<DataTable
1515
itemCount={displaySizes.length}
1616
data={displaySizes.map((size) => ({ text: `Display ${size}`, className: `display-${size}` }))}

www/src/components/typography-page/Headings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function Headings() {
1818
return (
1919
<>
2020
<h2 className="mb-2">Headings</h2>
21-
<div className="mb-4">
21+
<div className="mb-4 pgn-doc__code-headings-block">
2222
<DataTable
2323
itemCount={tableData.length}
2424
data={tableData}

www/src/components/typography-page/Links.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
import React from 'react';
22
// @ts-ignore
3-
import { DataTable } from '~paragon-react';
3+
import { DataTable, Alert } from '~paragon-react';
4+
import { Info } from '~paragon-icons';
45
import { TextCell } from '../TableCells';
56

67
const linksClassesAndDescriptions = [
7-
{
8-
example: <a href="/#">Standalone Link</a>,
9-
description: <span>The default style for <code>a</code> tags that don`t appear in a <code>p</code> tag.</span>,
10-
},
118
{
129
example: <span>An <a className="inline-link" href="/foundations/typography/">inline link</a> in a sentence.</span>,
1310
description: <span>For links inside a <code>p</code> or with the <code>.inline-link</code> class name.</span>,
@@ -34,6 +31,9 @@ export default function Links() {
3431
return (
3532
<>
3633
<h2 className="mb-2">Links</h2>
34+
<Alert variant="info" icon={Info}>
35+
<a href="/#">Standalone Link</a> - the default style for <code>a</code> tag that appear outside of <code>p</code> tag.
36+
</Alert>
3737
<div className="mb-4">
3838
<DataTable
3939
itemCount={4}

0 commit comments

Comments
 (0)