genesys-react-components 0.3.3 → 0.4.1-devengage-1573-implementing-tables.245

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ declare global {
6
6
  }
7
7
  }
8
8
  interface IProps {
9
- value: string | JSX.Element;
9
+ value: string;
10
10
  noCollapse?: boolean;
11
11
  noHeader?: boolean;
12
12
  autoCollapse?: boolean;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { DataTableRow } from '..';
3
+ import './DataTable.scss';
4
+ interface IProps {
5
+ rows: DataTableRow[];
6
+ headerRow?: DataTableRow;
7
+ className?: string;
8
+ indentation?: number;
9
+ sortable?: boolean;
10
+ filterable?: boolean;
11
+ }
12
+ export default function DataTable(props: IProps): JSX.Element;
13
+ export {};
package/build/index.d.ts CHANGED
@@ -14,8 +14,9 @@ import AlertBlock from './alertblock/AlertBlock';
14
14
  import LoadingPlaceholder from './loadingplaceholder/LoadingPlaceholder';
15
15
  import Tooltip from './tooltip/Tooltip';
16
16
  import CopyButton from './copybutton/CopyButton';
17
+ import DataTable from './datatable/DataTable';
17
18
  import CodeFence from './codefence/CodeFence';
18
- export { DxAccordion, DxAccordionGroup, DxButton, DxItemGroup, DxCheckbox, DxLabel, DxTabbedContent, DxTabPanel, DxTextbox, DxToggle, Tooltip, CopyButton, LoadingPlaceholder, AlertBlock, CodeFence, };
19
+ export { DxAccordion, DxAccordionGroup, DxButton, DxItemGroup, DxCheckbox, DxLabel, DxTabbedContent, DxTabPanel, DxTextbox, DxToggle, Tooltip, CopyButton, LoadingPlaceholder, AlertBlock, CodeFence, DataTable, };
19
20
  export interface StringChangedCallback {
20
21
  (value: string): void;
21
22
  }
@@ -108,3 +109,14 @@ export interface DxTabPanelProps {
108
109
  children: React.ReactNode;
109
110
  className?: string;
110
111
  }
112
+ export interface DataTableRow {
113
+ cells: DataTableCell[];
114
+ }
115
+ export interface DataTableCell {
116
+ raw?: string;
117
+ renderedContent: React.ReactNode;
118
+ content: string;
119
+ parsedContent?: string | number | Date;
120
+ align?: 'left' | 'center' | 'right';
121
+ copyButton?: boolean;
122
+ }