⚠️ Deprecated: Please use easy-antd
Quickly render simple elements like table from the antd library
🏠 Homepage
- node >=10
import {EasyTable} from "easy-antd"
export const MyComponent = () => (
<EasyTable
data={[
{ name: "John", age: 22 },
{ name: "Mike", age: 29 },
]}
cols={[
{ title: "Name", key: "name", sort: "alphabetically" },
{ title: "Age", key: "age", sort: "numerically" },
]}
/>
)
"sort" prop on column item is optional, default is "none" sort?: "none" | "alphabetically" | "numerically"
type ColumnType = {
title: string;
key: string;
sort?: "none" | "alphabetically" | "numerically"; // default: none
};
type EasyTableProps = {
cols: ColumnType[];
data: Object[];
};
You can always provide additional props: https://ant.design/components/table For example:
<EasyTable cols={cols} data={data} size="small" />
👤 GorkemSinirlioglu
- Website: gorkemsinirlioglu.com
- Github: @GorkemSinirlioglu
- LinkedIn: @gorkemsinirlioglu
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2022 GorkemSinirlioglu.
This project is MIT licensed.