Skip to content

Commit 0832b17

Browse files
fix: adjust types (#104)
1 parent f6626ea commit 0832b17

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.changeset/hot-deer-hug.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@zenml-io/react-component-library": patch
3+
---
4+
5+
adjust types

src/components/Table/DataTable.stories.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type DummyData = {
1111
age: number;
1212
};
1313

14-
const cols: ColumnDef<DummyData, unknown>[] = [
14+
const cols: ColumnDef<DummyData>[] = [
1515
{
1616
id: "id",
1717
header: "ID",
@@ -134,7 +134,7 @@ const CustomizedDataTable = () => {
134134
);
135135
};
136136

137-
const colsCustomized: ColumnDef<DummyData, unknown>[] = [
137+
const colsCustomized: ColumnDef<DummyData>[] = [
138138
{
139139
id: "select",
140140
accessorKey: "select",

src/components/Table/Sorting.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ function SortingArrow({ direction }: Props) {
1515
return <Comp className="h-4 w-4 shrink-0" />;
1616
}
1717

18-
interface HeaderProps<TData extends RowData> {
19-
header: Header<TData, unknown>;
18+
interface HeaderProps<TData extends RowData, TValue> {
19+
header: Header<TData, TValue>;
2020
}
2121

22-
export function SortableHeader<TData extends RowData>({
22+
export function SortableHeader<TData extends RowData, TValue>({
2323
header,
2424
children
25-
}: PropsWithChildren<HeaderProps<TData>>) {
25+
}: PropsWithChildren<HeaderProps<TData, TValue>>) {
2626
return (
2727
<button
2828
className={`${

0 commit comments

Comments
 (0)