Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
feat(COR-1913): Add JSDoc to narrowtable
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-van-eekelen committed Mar 21, 2024
1 parent 4349092 commit 4ebb935
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion packages/app/src/components/tables/narrow-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,22 @@ interface NarrowTableProps extends CommonTableProps {
headerText: string;
}

// Component shown for tables on narrow screens.
/**
* `NarrowTable` is a functional component that renders a table specifically for use on mobile screens.
* It takes a `NarrowTableProps` object as its properties.
*
* @component
* @param {Object} props - The properties that define the `NarrowTable` component.
* @param {Array} props.tableData - An array of objects where each object represents a row in the table. Each object should include an `id` and a `firstColumnLabel`.
* @param {string} props.headerText - The text to be displayed as the table's header.
* @param {Array} props.percentageData - An array of objects where each object represents a percentage data point to be displayed in the table.
*
* @example
* <NarrowTable tableData={tableData} headerText="Sample Table" percentageData={percentageData} />
*
* @extends {CommonTableProps}
* @returns {React.Element} The rendered `NarrowTable` component.
*/
export const NarrowTable = ({ tableData, headerText, percentageData }: NarrowTableProps) => {
return (
<Box overflow="auto">
Expand Down

0 comments on commit 4ebb935

Please sign in to comment.