diff --git a/packages/react-components/src/docs/components/Table/Table.tsx b/packages/react-components/src/docs/components/Table/Table.tsx index e3feb36be..02abffb06 100644 --- a/packages/react-components/src/docs/components/Table/Table.tsx +++ b/packages/react-components/src/docs/components/Table/Table.tsx @@ -3,13 +3,19 @@ import * as React from 'react'; import './Table.css'; import { handleCopyText } from '../../helpers'; -interface ITable { - data: T[]; +type BasicTableData = Record & { + enum: string; + value: string; + deprecated?: boolean; +}; + +interface ITable { + data: BasicTableData[]; columnNames: string[]; renderExample?: (token: string) => React.ReactNode; } -export const Table: React.FC>> = ({ +export const Table: React.FC = ({ data, columnNames, renderExample, @@ -30,7 +36,7 @@ export const Table: React.FC>> = ({ if (cellIndex === 0) { return ( handleCopyText(value as string)}> - {renderExample && renderExample(row['value'] as string)} + {renderExample && renderExample(row['value'])} {row['enum']} {row['deprecated'] && (deprecated)}