Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/hot-deer-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zenml-io/react-component-library": patch
---

adjust types
4 changes: 2 additions & 2 deletions src/components/Table/DataTable.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type DummyData = {
age: number;
};

const cols: ColumnDef<DummyData, unknown>[] = [
const cols: ColumnDef<DummyData>[] = [
{
id: "id",
header: "ID",
Expand Down Expand Up @@ -134,7 +134,7 @@ const CustomizedDataTable = () => {
);
};

const colsCustomized: ColumnDef<DummyData, unknown>[] = [
const colsCustomized: ColumnDef<DummyData>[] = [
{
id: "select",
accessorKey: "select",
Expand Down
8 changes: 4 additions & 4 deletions src/components/Table/Sorting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ function SortingArrow({ direction }: Props) {
return <Comp className="h-4 w-4 shrink-0" />;
}

interface HeaderProps<TData extends RowData> {
header: Header<TData, unknown>;
interface HeaderProps<TData extends RowData, TValue> {
header: Header<TData, TValue>;
}

export function SortableHeader<TData extends RowData>({
export function SortableHeader<TData extends RowData, TValue>({
header,
children
}: PropsWithChildren<HeaderProps<TData>>) {
}: PropsWithChildren<HeaderProps<TData, TValue>>) {
return (
<button
className={`${
Expand Down