Skip to content

Commit

Permalink
docs: add loading state to CSS variables table (#2858)
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorrusakov committed Nov 27, 2023
1 parent 60112a5 commit f86824f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions styles/scss/core/core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@import "~bootstrap/scss/reboot";
@import "typography";
@import "grid";
@import "~react-loading-skeleton/dist/skeleton.css";
@import "~bootstrap/scss/transitions";
@import "utilities";
@import "~bootstrap/scss/media";
Expand Down
6 changes: 4 additions & 2 deletions www/src/components/ComponentVariablesTable.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import React, { useContext, useEffect, useState } from 'react';
import { DataTable } from '~paragon-react';
import { DataTable, Skeleton } from '~paragon-react';
import { SettingsContext } from '../context/SettingsContext';

const initialTableData = Array(5).fill({ variableName: <Skeleton />, computedValue: <Skeleton /> });

function ComponentVariablesTable({ rawStylesheet }: ComponentVariablesTableProps) {
const [tableData, setTableData] = useState<Array<TableRowData>>([]);
const [tableData, setTableData] = useState<Array<TableRowData>>(initialTableData);
const { settings: { theme } } = useContext(SettingsContext);

useEffect(() => {
Expand Down
1 change: 1 addition & 0 deletions www/src/scss/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@import "../components/Search/Search";
@import "../components/IconsTable";
@import "../components/exampleComponents/ExamplePropsForm";
@import "~react-loading-skeleton/dist/skeleton";

:root {
--pgn-elevation-modal-zindex: 2503;
Expand Down

0 comments on commit f86824f

Please sign in to comment.