跳至主要内容

開始使用

你的專案中 開始使用

或是在 CodeSandbox 試試看 Bear React Table

你需要什麼環境

安裝

yarn add bear-react-table

您可以在命令提示符、Powershell、終端或代碼編輯器的任何其他集成終端中鍵入此命令

在你的專案中使用

將所需的樣式文件添加到項目入口點

/src/App.tsx
import 'bear-react-table/dist/index.css';

接著使用看看

import styled from 'styled-components';
import Table from 'bear-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'}},
]}
/>
);
}

然後看到這個就代表你成功了

Title
Text
Image Chiuthis is a frontend coder
Gary Chienthis is a backend coder
Show 1 - 0 itemTotal 0 item / 1 Page