@xyo-network/react-table 5.3.0 → 5.3.1
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/dist/browser/index.mjs +2 -2
- package/dist/browser/index.mjs.map +1 -1
- package/dist/types/context/TableHeight/Context.d.ts +9 -2
- package/dist/types/context/TableHeight/Context.d.ts.map +1 -1
- package/dist/types/context/TableHeight/Provider.d.ts +1 -1
- package/dist/types/context/TableHeight/Provider.d.ts.map +1 -1
- package/dist/types/context/TableHeight/State.d.ts +3 -3
- package/dist/types/context/TableHeight/State.d.ts.map +1 -1
- package/dist/types/context/TableHeight/use.d.ts +9 -1
- package/dist/types/context/TableHeight/use.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/context/TableHeight/Context.ts +1 -1
- package/src/context/TableHeight/Provider.tsx +3 -2
- package/src/context/TableHeight/State.ts +3 -3
- package/src/context/TableHeight/use.ts +1 -1
package/dist/browser/index.mjs
CHANGED
|
@@ -47,7 +47,7 @@ var TableFooterExRoot = styled2(TableFooter, {
|
|
|
47
47
|
var TableFooterEx = /* @__PURE__ */ __name(({ children, ...props }) => /* @__PURE__ */ React2.createElement(TableFooterExRoot, props, children), "TableFooterEx");
|
|
48
48
|
|
|
49
49
|
// src/context/TableHeight/Context.ts
|
|
50
|
-
import { createContextEx } from "@
|
|
50
|
+
import { createContextEx } from "@xylabs/react-shared";
|
|
51
51
|
var TableHeightContext = createContextEx();
|
|
52
52
|
|
|
53
53
|
// src/context/TableHeight/Provider.tsx
|
|
@@ -90,7 +90,7 @@ var TableHeightProvider = /* @__PURE__ */ __name(({ children, additionalRows = 0
|
|
|
90
90
|
}, "TableHeightProvider");
|
|
91
91
|
|
|
92
92
|
// src/context/TableHeight/use.ts
|
|
93
|
-
import { useContextEx } from "@
|
|
93
|
+
import { useContextEx } from "@xylabs/react-shared";
|
|
94
94
|
var useTableHeight = /* @__PURE__ */ __name((required = false) => useContextEx(TableHeightContext, "TableHeight", required), "useTableHeight");
|
|
95
95
|
export {
|
|
96
96
|
TableCellEx,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/TableEx/TableCellEx.tsx","../../src/components/TableEx/TableEx.tsx","../../src/components/TableEx/TableFooterEx.tsx","../../src/context/TableHeight/Context.ts","../../src/context/TableHeight/Provider.tsx","../../src/context/TableHeight/use.ts"],"sourcesContent":["import type { TableCellProps } from '@mui/material'\nimport { styled, TableCell } from '@mui/material'\n\nexport interface TableCellExProps extends TableCellProps {\n noBgColor?: boolean\n}\n\nexport const TableCellEx = styled(TableCell, { name: 'TableCellNoBgColor', shouldForwardProp: prop => prop !== 'noBgColor' })<TableCellExProps>(\n ({ noBgColor = true }) => ({ ...(noBgColor && { backgroundColor: 'transparent' }) }),\n)\n","import type { TableProps } from '@mui/material'\nimport { Table } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport type { TableExVariants } from './types/index.ts'\n\nexport interface TableExProps extends PropsWithChildren, TableProps {\n variant?: TableExVariants\n}\n\nconst TableExInner: React.FC<TableExProps> = ({ children, ...props }) => {\n return (\n <Table {...props}>\n {children}\n </Table>\n )\n}\n\nTableExInner.displayName = 'TableExInner'\n\nexport const TableExWithRef: React.FC<TableExProps> = ({\n variant, children, ...props\n}) => {\n return (\n <TableExInner stickyHeader={variant === 'scrollable'} {...props}>\n {children}\n </TableExInner>\n )\n}\n\nTableExWithRef.displayName = 'TableEx'\n\nexport const TableEx = TableExWithRef\n","import type { TableFooterProps } from '@mui/material'\nimport { styled, TableFooter } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport type { TableExVariants } from './types/index.ts'\n\nconst TableFooterExRoot = styled(TableFooter, {\n name: 'TableFooterEx',\n shouldForwardProp: propName => propName !== 'scrollable',\n slot: 'Root',\n})<TableFooterExProps>(({ variant, theme }) => ({\n backgroundColor: theme.vars.palette.background.default,\n bottom: 'unset',\n position: 'relative',\n ...(variant === 'scrollable' && {\n bottom: 0,\n position: 'sticky',\n }),\n}))\n\nexport interface TableFooterExProps extends PropsWithChildren, TableFooterProps {\n variant?: TableExVariants\n}\n\nexport const TableFooterEx: React.FC<TableFooterExProps> = ({ children, ...props }) => <TableFooterExRoot {...props}>{children}</TableFooterExRoot>\n","import { createContextEx } from '@
|
|
1
|
+
{"version":3,"sources":["../../src/components/TableEx/TableCellEx.tsx","../../src/components/TableEx/TableEx.tsx","../../src/components/TableEx/TableFooterEx.tsx","../../src/context/TableHeight/Context.ts","../../src/context/TableHeight/Provider.tsx","../../src/context/TableHeight/use.ts"],"sourcesContent":["import type { TableCellProps } from '@mui/material'\nimport { styled, TableCell } from '@mui/material'\n\nexport interface TableCellExProps extends TableCellProps {\n noBgColor?: boolean\n}\n\nexport const TableCellEx = styled(TableCell, { name: 'TableCellNoBgColor', shouldForwardProp: prop => prop !== 'noBgColor' })<TableCellExProps>(\n ({ noBgColor = true }) => ({ ...(noBgColor && { backgroundColor: 'transparent' }) }),\n)\n","import type { TableProps } from '@mui/material'\nimport { Table } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport type { TableExVariants } from './types/index.ts'\n\nexport interface TableExProps extends PropsWithChildren, TableProps {\n variant?: TableExVariants\n}\n\nconst TableExInner: React.FC<TableExProps> = ({ children, ...props }) => {\n return (\n <Table {...props}>\n {children}\n </Table>\n )\n}\n\nTableExInner.displayName = 'TableExInner'\n\nexport const TableExWithRef: React.FC<TableExProps> = ({\n variant, children, ...props\n}) => {\n return (\n <TableExInner stickyHeader={variant === 'scrollable'} {...props}>\n {children}\n </TableExInner>\n )\n}\n\nTableExWithRef.displayName = 'TableEx'\n\nexport const TableEx = TableExWithRef\n","import type { TableFooterProps } from '@mui/material'\nimport { styled, TableFooter } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport type { TableExVariants } from './types/index.ts'\n\nconst TableFooterExRoot = styled(TableFooter, {\n name: 'TableFooterEx',\n shouldForwardProp: propName => propName !== 'scrollable',\n slot: 'Root',\n})<TableFooterExProps>(({ variant, theme }) => ({\n backgroundColor: theme.vars.palette.background.default,\n bottom: 'unset',\n position: 'relative',\n ...(variant === 'scrollable' && {\n bottom: 0,\n position: 'sticky',\n }),\n}))\n\nexport interface TableFooterExProps extends PropsWithChildren, TableFooterProps {\n variant?: TableExVariants\n}\n\nexport const TableFooterEx: React.FC<TableFooterExProps> = ({ children, ...props }) => <TableFooterExRoot {...props}>{children}</TableFooterExRoot>\n","import { createContextEx } from '@xylabs/react-shared'\n\nimport type { TableHeightState } from './State.ts'\n\nexport const TableHeightContext = createContextEx<TableHeightState>()\n","import { useResetState } from '@xylabs/react-hooks'\nimport type { ContextExProviderProps } from '@xylabs/react-shared'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo, useState } from 'react'\n\nimport { TableHeightContext } from './Context.ts'\nimport type { TableHeightState } from './State.ts'\n\nexport interface TableHeightProviderProps extends ContextExProviderProps, PropsWithChildren {\n /** @field Account for optional header and footer rows */\n additionalRows?: number\n defaultVisibleRows?: number\n heightFormat?: string\n}\n\nexport const TableHeightProvider: React.FC<TableHeightProviderProps> = ({\n children,\n additionalRows = 0,\n defaultVisibleRows,\n heightFormat = 'px',\n}) => {\n const [visibleRows, setVisibleRows] = useResetState(defaultVisibleRows)\n const [rowHeight, setRowHeight] = useState<number | undefined>()\n\n const height = useMemo(() => {\n if (rowHeight !== undefined && visibleRows !== undefined) {\n return rowHeight * (visibleRows + additionalRows)\n }\n }, [defaultVisibleRows, rowHeight, visibleRows, additionalRows])\n\n const formattedHeight = useMemo(() => (height === undefined ? undefined : `${height}${heightFormat}`), [height, heightFormat])\n\n const value: TableHeightState = useMemo(() => ({\n height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows,\n }), [formattedHeight, rowHeight, setRowHeight, setVisibleRows, visibleRows])\n\n return (\n <TableHeightContext value={value}>\n {children}\n </TableHeightContext>\n )\n}\n","import { useContextEx } from '@xylabs/react-shared'\n\nimport { TableHeightContext } from './Context.ts'\n\nexport const useTableHeight = (required = false) => useContextEx(TableHeightContext, 'TableHeight', required)\n"],"mappings":";;;;AACA,SAASA,QAAQC,iBAAiB;AAM3B,IAAMC,cAAcC,OAAOC,WAAW;EAAEC,MAAM;EAAsBC,mBAAmBC,wBAAAA,SAAQA,SAAS,aAAjBA;AAA6B,CAAA,EACzH,CAAC,EAAEC,YAAY,KAAI,OAAQ;EAAE,GAAIA,aAAa;IAAEC,iBAAiB;EAAc;AAAG,EAAA;;;ACPpF,SAASC,aAAa;AAEtB,OAAOC,WAAW;AAQlB,IAAMC,eAAuC,wBAAC,EAAEC,UAAU,GAAGC,MAAAA,MAAO;AAClE,SACE,sBAAA,cAACC,OAAUD,OACRD,QAAAA;AAGP,GAN6C;AAQ7CD,aAAaI,cAAc;AAEpB,IAAMC,iBAAyC,wBAAC,EACrDC,SAASL,UAAU,GAAGC,MAAAA,MACvB;AACC,SACE,sBAAA,cAACF,cAAAA;IAAaO,cAAcD,YAAY;IAAe,GAAGJ;KACvDD,QAAAA;AAGP,GARsD;AAUtDI,eAAeD,cAAc;AAEtB,IAAMI,UAAUH;;;AChCvB,SAASI,UAAAA,SAAQC,mBAAmB;AAEpC,OAAOC,YAAW;AAIlB,IAAMC,oBAAoBC,QAAOC,aAAa;EAC5CC,MAAM;EACNC,mBAAmBC,wBAAAA,aAAYA,aAAa,cAAzBA;EACnBC,MAAM;AACR,CAAA,EAAuB,CAAC,EAAEC,SAASC,MAAK,OAAQ;EAC9CC,iBAAiBD,MAAME,KAAKC,QAAQC,WAAWC;EAC/CC,QAAQ;EACRC,UAAU;EACV,GAAIR,YAAY,gBAAgB;IAC9BO,QAAQ;IACRC,UAAU;EACZ;AACF,EAAA;AAMO,IAAMC,gBAA8C,wBAAC,EAAEC,UAAU,GAAGC,MAAAA,MAAY,gBAAAC,OAAA,cAACnB,mBAAsBkB,OAAQD,QAAAA,GAA3D;;;ACzB3D,SAASG,uBAAuB;AAIzB,IAAMC,qBAAqBD,gBAAAA;;;ACJlC,SAASE,qBAAqB;AAG9B,OAAOC,UAASC,SAASC,gBAAgB;AAYlC,IAAMC,sBAA0D,wBAAC,EACtEC,UACAC,iBAAiB,GACjBC,oBACAC,eAAe,KAAI,MACpB;AACC,QAAM,CAACC,aAAaC,cAAAA,IAAkBC,cAAcJ,kBAAAA;AACpD,QAAM,CAACK,WAAWC,YAAAA,IAAgBC,SAAAA;AAElC,QAAMC,SAASC,QAAQ,MAAA;AACrB,QAAIJ,cAAcK,UAAaR,gBAAgBQ,QAAW;AACxD,aAAOL,aAAaH,cAAcH;IACpC;EACF,GAAG;IAACC;IAAoBK;IAAWH;IAAaH;GAAe;AAE/D,QAAMY,kBAAkBF,QAAQ,MAAOD,WAAWE,SAAYA,SAAY,GAAGF,MAAAA,GAASP,YAAAA,IAAiB;IAACO;IAAQP;GAAa;AAE7H,QAAMW,QAA0BH,QAAQ,OAAO;IAC7CD,QAAQG;IAAiBE,UAAU;IAAMR;IAAWC;IAAcH;IAAgBD;EACpF,IAAI;IAACS;IAAiBN;IAAWC;IAAcH;IAAgBD;GAAY;AAE3E,SACE,gBAAAY,OAAA,cAACC,oBAAAA;IAAmBH;KACjBd,QAAAA;AAGP,GA1BuE;;;ACfvE,SAASkB,oBAAoB;AAItB,IAAMC,iBAAiB,wBAACC,WAAW,UAAUC,aAAaC,oBAAoB,eAAeF,QAAAA,GAAtE;","names":["styled","TableCell","TableCellEx","styled","TableCell","name","shouldForwardProp","prop","noBgColor","backgroundColor","Table","React","TableExInner","children","props","Table","displayName","TableExWithRef","variant","stickyHeader","TableEx","styled","TableFooter","React","TableFooterExRoot","styled","TableFooter","name","shouldForwardProp","propName","slot","variant","theme","backgroundColor","vars","palette","background","default","bottom","position","TableFooterEx","children","props","React","createContextEx","TableHeightContext","useResetState","React","useMemo","useState","TableHeightProvider","children","additionalRows","defaultVisibleRows","heightFormat","visibleRows","setVisibleRows","useResetState","rowHeight","setRowHeight","useState","height","useMemo","undefined","formattedHeight","value","provided","React","TableHeightContext","useContextEx","useTableHeight","required","useContextEx","TableHeightContext"]}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare const TableHeightContext: import("react").Context<{
|
|
2
|
+
height?: string;
|
|
3
|
+
rowHeight?: number;
|
|
4
|
+
setRowHeight?: import("react").Dispatch<import("react").SetStateAction<number | undefined>>;
|
|
5
|
+
setVisibleRows?: import("react").Dispatch<import("react").SetStateAction<number | undefined>>;
|
|
6
|
+
visibleRows?: number;
|
|
7
|
+
} & {
|
|
8
|
+
provided: true;
|
|
9
|
+
}>;
|
|
3
10
|
//# sourceMappingURL=Context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/context/TableHeight/Context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/context/TableHeight/Context.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB;;;;;;;;EAAsC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ContextExProviderProps } from '@
|
|
1
|
+
import type { ContextExProviderProps } from '@xylabs/react-shared';
|
|
2
2
|
import type { PropsWithChildren } from 'react';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
export interface TableHeightProviderProps extends ContextExProviderProps, PropsWithChildren {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../../src/context/TableHeight/Provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../../src/context/TableHeight/Provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAA4B,MAAM,OAAO,CAAA;AAKhD,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB,EAAE,iBAAiB;IACzF,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA0BlE,CAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ContextExState } from '@
|
|
1
|
+
import type { ContextExState } from '@xylabs/react-shared';
|
|
2
2
|
import type { Dispatch, SetStateAction } from 'react';
|
|
3
|
-
export
|
|
3
|
+
export type TableHeightState = ContextExState<{
|
|
4
4
|
height?: string;
|
|
5
5
|
rowHeight?: number;
|
|
6
6
|
setRowHeight?: Dispatch<SetStateAction<number | undefined>>;
|
|
7
7
|
setVisibleRows?: Dispatch<SetStateAction<number | undefined>>;
|
|
8
8
|
visibleRows?: number;
|
|
9
|
-
}
|
|
9
|
+
}>;
|
|
10
10
|
//# sourceMappingURL=State.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/context/TableHeight/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/context/TableHeight/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAErD,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAC3D,cAAc,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAC,CAAA"}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
export declare const useTableHeight: (required?: boolean) => Omit<
|
|
1
|
+
export declare const useTableHeight: (required?: boolean) => Omit<{
|
|
2
|
+
height?: string;
|
|
3
|
+
rowHeight?: number;
|
|
4
|
+
setRowHeight?: import("react").Dispatch<import("react").SetStateAction<number | undefined>>;
|
|
5
|
+
setVisibleRows?: import("react").Dispatch<import("react").SetStateAction<number | undefined>>;
|
|
6
|
+
visibleRows?: number;
|
|
7
|
+
} & {
|
|
8
|
+
provided: true;
|
|
9
|
+
}, "provided"> | Omit<never, "provided">;
|
|
2
10
|
//# sourceMappingURL=use.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/context/TableHeight/use.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,GAAI,kBAAgB,
|
|
1
|
+
{"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/context/TableHeight/use.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,GAAI,kBAAgB;;;;;;;;wCAA8D,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-table",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.1",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"types": "dist/types/index.d.ts",
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@xylabs/react-hooks": "^6.3.0",
|
|
43
|
-
"@
|
|
43
|
+
"@xylabs/react-shared": "^6.3.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@mui/icons-material": "^7.1.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@types/react": "^19.1.4",
|
|
50
50
|
"@xylabs/ts-scripts-yarn3": "^6.5.5",
|
|
51
51
|
"@xylabs/tsconfig-react": "^6.5.5",
|
|
52
|
-
"@xyo-network/react-storybook": "^5.3.
|
|
52
|
+
"@xyo-network/react-storybook": "^5.3.1",
|
|
53
53
|
"react": "^19.1.0",
|
|
54
54
|
"react-dom": "^19.1.0",
|
|
55
55
|
"react-router-dom": "^7.6.0",
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { useResetState } from '@xylabs/react-hooks'
|
|
2
|
-
import type { ContextExProviderProps } from '@
|
|
2
|
+
import type { ContextExProviderProps } from '@xylabs/react-shared'
|
|
3
3
|
import type { PropsWithChildren } from 'react'
|
|
4
4
|
import React, { useMemo, useState } from 'react'
|
|
5
5
|
|
|
6
6
|
import { TableHeightContext } from './Context.ts'
|
|
7
|
+
import type { TableHeightState } from './State.ts'
|
|
7
8
|
|
|
8
9
|
export interface TableHeightProviderProps extends ContextExProviderProps, PropsWithChildren {
|
|
9
10
|
/** @field Account for optional header and footer rows */
|
|
@@ -29,7 +30,7 @@ export const TableHeightProvider: React.FC<TableHeightProviderProps> = ({
|
|
|
29
30
|
|
|
30
31
|
const formattedHeight = useMemo(() => (height === undefined ? undefined : `${height}${heightFormat}`), [height, heightFormat])
|
|
31
32
|
|
|
32
|
-
const value = useMemo(() => ({
|
|
33
|
+
const value: TableHeightState = useMemo(() => ({
|
|
33
34
|
height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows,
|
|
34
35
|
}), [formattedHeight, rowHeight, setRowHeight, setVisibleRows, visibleRows])
|
|
35
36
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ContextExState } from '@
|
|
1
|
+
import type { ContextExState } from '@xylabs/react-shared'
|
|
2
2
|
import type { Dispatch, SetStateAction } from 'react'
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export type TableHeightState = ContextExState<{
|
|
5
5
|
height?: string
|
|
6
6
|
rowHeight?: number
|
|
7
7
|
setRowHeight?: Dispatch<SetStateAction<number | undefined>>
|
|
8
8
|
setVisibleRows?: Dispatch<SetStateAction<number | undefined>>
|
|
9
9
|
visibleRows?: number
|
|
10
|
-
}
|
|
10
|
+
}>
|