學習React Hooks和TypeScript實現仿Antd的react UI組件庫,並經過此組件庫在create-react-app的基礎上實現了一套簡單的應用,下方連接css
npm install rockui
yarn add rockui
複製代碼
import { Button, Icon } from "rockui";
const App = () => (
<>
<Button
size={ButtonSize.Small}
autoFocus
onClick={e => {
e.preventDefault();
}}
className="btn"
>
hello
</Button>
<Icon icon="coffee" theme="warning" size="2x" />
</>
);
複製代碼
And import style manually:ide
import "rockui/dist/rockui.css";
複製代碼
$ git clone https://github.com/s2265681/rockui.git
$ cd rockui
$ npm install
$ npm start
$ 修改註釋 src/index.tsx 組件發佈 >>> 頁面展現
複製代碼
歡迎一塊兒學習,提issue,一塊兒merge新功能。svg