2.0.5 ā¢ Published 2 years ago
easy-antd-table v2.0.5
:warning: Deprecated: Please use easy-antd
Quickly render simple elements like table from the antd library
š Homepage
Prerequisites
- node >=10
EasyTable
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" />
Author
š¤ GorkemSinirlioglu
- Website: gorkemsinirlioglu.com
- Github: @GorkemSinirlioglu
- LinkedIn: @gorkemsinirlioglu
š¤ Contributing
Contributions, issues and feature requests are welcome!Feel free to check issues page. You can also take a look at the contributing guide.
Show your support
Give a āļø if this project helped you!
š License
Copyright Ā© 2022 GorkemSinirlioglu. This project is MIT licensed.