Madeorsk
76c56145ca
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
71 lines
1.1 KiB
TypeScript
71 lines
1.1 KiB
TypeScript
import React from "react";
|
|
import {createSmartable} from "../src/Smartable/Smartable";
|
|
import {createColumn, createColumns} from "../src/Smartable/Column";
|
|
|
|
// Create main table.
|
|
const Smartable = createSmartable({
|
|
columns: createColumns(
|
|
createColumn("123", {
|
|
title: "test",
|
|
}),
|
|
createColumn("456", {
|
|
title: "ttt",
|
|
}),
|
|
createColumn("789", {
|
|
title: "another",
|
|
}),
|
|
createColumn("test", {
|
|
title: "last one",
|
|
}),
|
|
),
|
|
});
|
|
|
|
export function DemoTable()
|
|
{
|
|
return (
|
|
<Smartable.Table shownColumns={["123", "456", "test"]} data={[
|
|
{
|
|
"123": {
|
|
data: "test abc",
|
|
},
|
|
test: {
|
|
data: 123,
|
|
},
|
|
"789": {
|
|
data: "test etset",
|
|
},
|
|
"456": {
|
|
data: "test vccvcvc",
|
|
},
|
|
},
|
|
{
|
|
"123": {
|
|
data: "any data",
|
|
},
|
|
test: {
|
|
data: 5552,
|
|
},
|
|
"789": {
|
|
data: "foo bar",
|
|
},
|
|
"456": {
|
|
data: "baz",
|
|
},
|
|
},
|
|
{
|
|
"123": {
|
|
data: "test test",
|
|
},
|
|
test: {
|
|
data: 5552,
|
|
},
|
|
"789": {
|
|
data: "other test",
|
|
},
|
|
"456": {
|
|
data: "infinite testing",
|
|
},
|
|
},
|
|
]} />
|
|
);
|
|
}
|