@symply.io/basic-components 1.1.3-beta.3 → 1.1.3
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.
- package/DataTable/types.d.ts +3 -3
- package/README.md +12 -10
- package/package.json +1 -1
package/DataTable/types.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ReactElement, CSSProperties } from "react";
|
2
|
-
declare type
|
2
|
+
declare type HexColor = `#${string}`;
|
3
3
|
export declare type CustomRowBgColor = {
|
4
|
-
normal?:
|
5
|
-
hover?:
|
4
|
+
normal?: HexColor;
|
5
|
+
hover?: HexColor;
|
6
6
|
};
|
7
7
|
export declare type OrderType = "ASC" | "DESC" | "NONE";
|
8
8
|
export declare type KvProps = Record<string, unknown>;
|
package/README.md
CHANGED
@@ -393,22 +393,24 @@ import DataTable, { useDataTable } from '@symply.io/basic-components/DataTable';
|
|
393
393
|
|
394
394
|
| Name | Type | Description |
|
395
395
|
| ------- | ----------------------------- | ------------------------- |
|
396
|
-
| headers | Array\<TableHeaderCellProps\> | The cells for the header. |
|
397
396
|
| columns | Array\<TableBodyCellProps\> | The cells for the body. |
|
398
397
|
| footers | Array\<TableFooterCellProps> | The cells for the footer. |
|
398
|
+
| headers | Array\<TableHeaderCellProps\> | The cells for the header. |
|
399
399
|
| rows | Array<RowProps\> | The rows for the table. |
|
400
400
|
|
401
401
|
<h5>Component Props</h5>
|
402
402
|
|
403
|
-
| Name
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
403
|
+
| Name | Type | Default | Required | Description |
|
404
|
+
| --------------------- | ----------------------------- | ---------- | -------- | ------------------------------------------------------------ |
|
405
|
+
| columns | Array\<TableBodyCellProps\> | | true | The cells for the body. (from the hook) |
|
406
|
+
| dense | bool | | false | If `true` the table size/density would be tight. |
|
407
|
+
| footers | Array\<TableFooterCellProps> | [] | false | The cells for the footer. (from the hook) |
|
408
|
+
| headers | Array\<TableHeaderCellProps\> | | true | The cells for the header. (from the hook) |
|
409
|
+
| noDataText | string | 'No Data!' | false | The text when no data rendered. |
|
410
|
+
| onCustomizeRowBgColor | func | | false | The function for customizing the row background color.<br />**Signature:**<br/>`function(props: {row: RowProps, columns: Array\<ColumnProps\>}) => {normal?: HexColor;<br/> hover?: HexColor;<br/>}` |
|
411
|
+
| onRowClick | func | | false | The function for row clicking.<br />**Signature:**<br/>`function(row: RowProps) => unknown` |
|
412
|
+
| rows | Array<RowProps\> | | true | The rows for the table. (from the hook) |
|
413
|
+
| stickyHeader | bool | | false | Set the header sticky.<br/>⚠️ It doesn't work with IE11. |
|
412
414
|
|
413
415
|
|
414
416
|
|