zombieJ / antd-geek-theme-sample

Home Page:https://zombiej.github.io/antd-geek-theme-sample/demos/theme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Geek Theme

About

Sample code in styles/styleUtil copy the antd genComponentStyleHook function. You can use any other css-in-js solution to generate style hook like Emotion or styled-components.

Usage

Use ThemeProvider to wrap your app.

import { ThemeProvider } from 'antd-geek-theme-sample';
import { Button, Space, Switch } from 'antd';
import React from 'react';

const desc = 'Hello World';

const App: React.FC = () => (
  <ThemeProvider>
    <Space>
      <Button type="primary">{desc}</Button>
      <Switch checkedChildren={desc} unCheckedChildren={desc} />
    </Space>
  </ThemeProvider>
);

export default App;

API

ThemeProvider

Wrapper component will pass config with antd ConfigProvider.

Development

npm install
npm start

Test Case

npm test
npm run coverage

open coverage/ dir

License

antd-geek-theme-sample is under the MIT license.

About

https://zombiej.github.io/antd-geek-theme-sample/demos/theme

License:MIT License


Languages

Language:TypeScript 95.5%Language:JavaScript 4.5%