Skip to content

Commit

Permalink
LG-4604: extend TableSkeleton component columnLabels prop type (#2502)
Browse files Browse the repository at this point in the history
* LG-4604: TableSkeleton columnLabels prop type

* Changeset
  • Loading branch information
stephl3 authored Oct 15, 2024
1 parent 5f10976 commit 4058d6d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/dull-pianos-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/skeleton-loader': patch
---

[LG-4604](https://jira.mongodb.org/browse/LG-4604): Extends `TableSkeleton` component's `columnLabels` prop type from `Array<string | undefined>` to `Array<React.ReactNode>`
14 changes: 7 additions & 7 deletions packages/skeleton-loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ npm install @leafygreen-ui/skeleton-loader

#### Table Skeleton

| Name | Type | Default | Description |
| ---------------- | --------------- | ------- | ------------------------------------------------------------------------------------- |
| `columnLabels` | `Array<string>` | | Column labels. Empty strings will be treated as unknown and render a simple skeleton. |
| `numRows` | `number` | `5` | Number of rows |
| `numCols` | `number` | `4` | Number of columns |
| `baseFontSize` | `13 \| 16` | `13` | Base font size |
| HTML `div` props | | | Additional HTML div properties |
| Name | Type | Default | Description |
| ---------------- | ------------------------ | ------- | ------------------------------------------------------------------------------------- |
| `columnLabels` | `Array<React.ReactNode>` | | Column labels. Empty strings will be treated as unknown and render a simple skeleton. |
| `numRows` | `number` | `5` | Number of rows |
| `numCols` | `number` | `4` | Number of columns |
| `baseFontSize` | `13 \| 16` | `13` | Base font size |
| HTML `div` props | | | Additional HTML div properties |

#### Form Skeleton

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface TableSkeletonProps
/**
* Column labels. Empty strings or undefined values will be treated as unknown and render a simple skeleton.
*/
columnLabels?: Array<string | undefined>;
columnLabels?: Array<React.ReactNode>;

/**
* Number of rows
Expand Down

0 comments on commit 4058d6d

Please sign in to comment.