From 60e98ed668a21589392fdcb229129d11e59e031c Mon Sep 17 00:00:00 2001 From: mckervinc Date: Thu, 30 May 2024 21:55:46 -0400 Subject: [PATCH] more style changes --- example/src/examples/07-controlled.tsx | 3 ++- example/src/examples/08-header.tsx | 3 ++- example/src/examples/10-footer.tsx | 5 +++-- index.d.ts | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/example/src/examples/07-controlled.tsx b/example/src/examples/07-controlled.tsx index fb5059e..934b281 100644 --- a/example/src/examples/07-controlled.tsx +++ b/example/src/examples/07-controlled.tsx @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import { randCatchPhrase, randCity, @@ -104,7 +105,7 @@ const Controlled = ({ data, height, columns: variableColumns }: ControlledProps) ); - const cellStyle = { + const cellStyle: any = { background: sortDirection ? "rgb(39, 40, 34)" : undefined, ...style }; diff --git a/example/src/examples/10-footer.tsx b/example/src/examples/10-footer.tsx index 95e022d..f2485fe 100644 --- a/example/src/examples/10-footer.tsx +++ b/example/src/examples/10-footer.tsx @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import { useEffect, useRef, useState } from "react"; import { ColumnProps, FooterProps, Table } from "react-fluid-table"; import { Checkbox, Form, Grid, Icon, Input, Radio } from "semantic-ui-react"; @@ -192,11 +193,11 @@ const Example10 = () => { ); diff --git a/index.d.ts b/index.d.ts index 8b6690d..729a61d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -172,7 +172,7 @@ export type ColumnProps = { /** * specifies whether or not to display a footer cell */ - footer?: (props: FooterCellProps) => ReactNode; + footer?: (props: FooterCellProps) => ReactNode | JSX.Element; }; export type TableRef = { @@ -310,7 +310,7 @@ export type TableProps = { /** * When a column has `expander`, this component will be rendered under the row. */ - subComponent?: (props: SubComponentProps) => ReactNode; + subComponent?: (props: SubComponentProps) => ReactNode | JSX.Element; /** * The callback that gets called every time a row is clicked. */