# @jswork/react-ant-table

> Antd table.

Latest version **1.0.1** (published 2021-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jswork/react-ant-table
pnpm add @jswork/react-ant-table
yarn add @jswork/react-ant-table
bun add @jswork/react-ant-table
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-09-10 |
| First published | 2021-09-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | afeiship |

## Links

- npm: https://www.npmjs.com/package/@jswork/react-ant-table
- npm.io page: https://npm.io/package/@jswork/react-ant-table

## Dependencies (3)

- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [@jswork/noop](https://npm.io/package/@jswork/noop.md) ^1.0.0
- [@jswork/filter-react-props](https://npm.io/package/@jswork/filter-react-props.md) ^1.0.2

## Recent versions

- 1.0.1 (latest) — 2021-09-10
- 1.0.0 — 2021-09-10

## README

# react-ant-table
> Antd table.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```shell
npm install -S @jswork/react-ant-table
```

## usage
1. import css
  ```scss
  @import "~@jswork/react-ant-table/dist/style.css";

  // or use sass
  @import "~@jswork/react-ant-table/dist/style.scss";

  // customize your styles:
  $react-ant-table-options: ()
  ```
2. import js
  ```js
  import React, { useState, useEffect } from 'react';
  import ReactAntTable from '@jswork/react-ant-table';
  import '../../src/components/style.scss';
  import styled from 'styled-components';
  import nxColumn from '@jswork/next-ant-column';
  const Container = styled.div`
    width: 80%;
    margin: 30px auto 0;
    height: 100vh;
    border: 1px solid #ccc;
  `;

  export default (props: any) => {
    const [dataSource, setDataSource] = useState([]);
    const columns = [nxColumn('ID', 'id'), nxColumn('Title', 'title'), nxColumn('UserId', 'userId')];

    useEffect(() => {
      fetch('https://jsonplaceholder.typicode.com/posts')
        .then((r) => r.json())
        .then((res) => {
          setDataSource(res);
        });
    }, []);

    return (
      <Container>
        <ReactAntTable
          columns={columns}
          dataSource={dataSource}
          pagination={{ pageSize: 15 }}
          rowKey="id"
        />
      </Container>
    );
  };

  ```

## preview
- https://afeiship.github.io/react-ant-table/

## license
Code released under [the MIT license](https://github.com/afeiship/react-ant-table/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/react-ant-table
[version-url]: https://npmjs.org/package/@jswork/react-ant-table

[license-image]: https://img.shields.io/npm/l/@jswork/react-ant-table
[license-url]: https://github.com/afeiship/react-ant-table/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/react-ant-table
[size-url]: https://github.com/afeiship/react-ant-table/blob/master/dist/react-ant-table.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/react-ant-table
[download-url]: https://www.npmjs.com/package/@jswork/react-ant-table

---
_Source: https://npm.io/package/@jswork/react-ant-table · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
