Skip to content

Commit

Permalink
fix: fixed typography, display and links sections
Browse files Browse the repository at this point in the history
  • Loading branch information
PKulkoRaccoonGang committed Oct 27, 2024
1 parent 70673e4 commit 6676868
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
11 changes: 11 additions & 0 deletions www/src/components/_doc-elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -342,3 +342,14 @@
grid-template-columns: repeat(4, 1fr); // 4 columns for large+ screens
}
}

.pgn-doc__code-display-block {
.pgn__data-table-cell-wrap {
max-width: max-content;
}

@media (--pgn-size-breakpoint-max-width-md) {
overflow: hidden;
overflow-x: scroll;
}
}
2 changes: 1 addition & 1 deletion www/src/components/typography-page/Display.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function Display() {
return (
<>
<h2 className="mb-2">Display</h2>
<div className="mb-4">
<div className="mb-4 pgn-doc__code-display-block">
<DataTable
itemCount={displaySizes.length}
data={displaySizes.map((size) => ({ text: `Display ${size}`, className: `display-${size}` }))}
Expand Down
10 changes: 5 additions & 5 deletions www/src/components/typography-page/Links.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import React from 'react';
// @ts-ignore
import { DataTable } from '~paragon-react';
import { DataTable, Alert } from '~paragon-react';
import { Info } from '~paragon-icons';
import { TextCell } from '../TableCells';

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

0 comments on commit 6676868

Please sign in to comment.