Getting Started
Get started in your project.
What you'll need
- Node.js version 14 or above:
- React.js version 18 or above:
- Styled-components version 5.3.x
Installation
yarn add @acrool/react-table
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
Start your project
Add the required style files
to your project entry point
/src/App.tsx
import '@acrool/react-table/dist/index.css';
import '@acrool/react-table/dist/themes/acrool.css'; // (options themes)
use component
import Table from '@acrool/react-table';
const MyPage = () => {
return (
<Table
isDark
title={{
name: {text: 'Title', col: 100},
desc: {text: 'Text', col: true},
}}
data={[
{id: 1, field: {name: 'Image Chiu', desc: 'this is a frontend coder'}},
{id: 2, field: {name: 'Gary Chien', desc: 'this is a backend coder'}},
]}
/>
);
}
Then seeing this means you succeeded
Title | Text |
---|---|
Image Chiu | this is a frontend coder |
Gary Chien | this is a backend coder |
Loading...
Show 1 - 0 itemTotal 0 item / 1 Page