+
All components (A-Z)
-
+
{all.map((node: IComponentNavItem) => )}
diff --git a/www/src/components/MeasuredItem.tsx b/www/src/components/MeasuredItem.tsx
index 646cafcc54..77e7ab3078 100644
--- a/www/src/components/MeasuredItem.tsx
+++ b/www/src/components/MeasuredItem.tsx
@@ -41,8 +41,6 @@ function MeasuredItem({
}, {});
setMeasurements(measurementsItems);
};
- // Needs a moment to finish switching theme and re-render children to DOM first.
- setMeasurements(initialMeasurements);
const timeout = setTimeout(measure, 1000);
return () => clearTimeout(timeout);
},
@@ -51,9 +49,9 @@ function MeasuredItem({
return (
<>
- {renderBefore ? renderBefore(measurements) : null}
+ {renderBefore?.(measurements)}
{React.cloneElement(children as React.ReactElement, { ref: itemRef })}
- {renderAfter ? renderAfter(measurements) : null}
+ {renderAfter?.(measurements)}
>
);
}
diff --git a/www/src/components/TableCells.tsx b/www/src/components/TableCells.tsx
index 2dd00c84a2..339aefb06b 100644
--- a/www/src/components/TableCells.tsx
+++ b/www/src/components/TableCells.tsx
@@ -6,6 +6,18 @@ export type CodeCellType = {
value: string | number | undefined,
};
+export type ClassNameRowType = {
+ className: string | undefined,
+ text: string,
+ hasClass?: boolean,
+};
+
+export type ClassNameCellType = {
+ row: {
+ original: ClassNameRowType,
+ },
+} & CodeCellType;
+
export type DataTableRowType = {
row: {
original: {
@@ -17,13 +29,17 @@ export type DataTableRowType = {
},
};
-export function ClassNameCell({ value }: CodeCellType) {
+export function ClassNameCell({ row, value }: ClassNameCellType) {
+ if (row.original.hasClass === false) {
+ return null;
+ }
+
if (!value) {
return null;
}
return (
-
+
.{value}
);
@@ -31,7 +47,7 @@ export function ClassNameCell({ value }: CodeCellType) {
export function TextCell({ value }: CodeCellType) {
return (
-
+
{value}
);
@@ -39,7 +55,7 @@ export function TextCell({ value }: CodeCellType) {
export function CodeCell({ value }: CodeCellType) {
return (
-
+
{value}
);
@@ -69,7 +85,7 @@ export function MobileMeasuredCell({ row } : DataTableRowType) {
export function StyleCell({ row } : DataTableRowType) {
return (
-
+
{row.original.text}
);
diff --git a/www/src/components/_CodeBlock.scss b/www/src/components/_CodeBlock.scss
index bfff2bae46..99f6d3dfc8 100644
--- a/www/src/components/_CodeBlock.scss
+++ b/www/src/components/_CodeBlock.scss
@@ -1,10 +1,11 @@
.pgn-doc__code-block {
margin: var(--pgn-spacing-spacer-base) 0 2rem;
- background-color: var(--pgn-color-light-200);
- border: solid 2px var(--pgn-color-light-300);
- border-radius: var(--pgn-size-border-radius-base);
.pgn-doc__code-block-preview {
+ background-color: var(--pgn-color-light-200);
+ border: solid 2px var(--pgn-color-light-300);
+ border-bottom: 0;
+ border-radius: var(--pgn-size-border-radius-base) var(--pgn-size-border-radius-base) 0 0;
padding: var(--pgn-spacing-spacer-base);
}
diff --git a/www/src/components/_doc-elements.scss b/www/src/components/_doc-elements.scss
index 94d3e937cd..decd92b57e 100644
--- a/www/src/components/_doc-elements.scss
+++ b/www/src/components/_doc-elements.scss
@@ -327,6 +327,18 @@
.color-palette {
display: grid;
- grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
- grid-row-gap: 2rem;
+ grid-gap: 2rem;
+ grid-template-columns: repeat(2, 1fr); // Default to 2 columns
+}
+
+@media (--pgn-size-breakpoint-min-width-md) {
+ .color-palette {
+ grid-template-columns: repeat(3, 1fr); // 3 columns for medium+ screens
+ }
+}
+
+@media (--pgn-size-breakpoint-min-width-lg) {
+ .color-palette {
+ grid-template-columns: repeat(4, 1fr); // 4 columns for large+ screens
+ }
}
diff --git a/www/src/components/header/Navbar.tsx b/www/src/components/header/Navbar.tsx
index ffef619923..dd7f188ec7 100644
--- a/www/src/components/header/Navbar.tsx
+++ b/www/src/components/header/Navbar.tsx
@@ -35,7 +35,7 @@ export default function Navbar({
return (
-
+
{showMinimizedTitle && (