GithubHelp home page GithubHelp logo

wbh1328551759 / antd-ui-wrapper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chainx-org/chainx-ui

0.0 1.0 0.0 2.07 MB

A library of react components based on ant design

Home Page: https://chainx-ui.chainx.org

Shell 0.40% JavaScript 45.27% TypeScript 54.33%

antd-ui-wrapper's Introduction

Chainx-Ui-Components

npm version

This is Chainx's front-end team, a more convenient and easy-to-use component library based on the ant design component library for secondary packaging.

Ant-design is powerful, but if you want to personalize the style customization, you need to spend a lot of time to modify. In order to avoid having to re-modify the default style that overrides ant-design every time a new project is created, it is necessary to recapture it.

At the same time, we can customize styles directly on components, such as:

<Icon cursor={'pointer'} iconSrc={IconSearch} size={24} />

The root element of Icon here is actually an img tag, and we can directly pass cursor, size or other set attributes on props to change its css style, without using styled-components or whatever to wrap him.

Get started

yarn add chainx-ui-components

Then you can reference it in your file!

import { Icon } from 'chainx-ui-components';

<Icon cursor={'pointer'} iconSrc={IconSearch} size={24} />

Extend

Our component library is also compatible with the powerful rebass library, which you can also use for some simple styling customization. such as:

<Text fontSize={15} fontWeight={600}>
  Test
</Text>

Moreover, since it is a component based on ant design for secondary encapsulation, the properties of the ant design component are also fully supported

Development

Unit Tests

When developing components, it is important to note that the coverage rate of unit tests should reach more than 90. The command to run the test is:

yarn test

The unit test files for each component are placed in the test directory of its directory, for example: lib/Button/__test__/Button.test.tsx

Documentation

Documentation is an important thing for a component library, and each component should have its corresponding documentation description. Document file placement path: lib/Button/Button.mdx

Regarding the writing of the mdx file, the docz library was developed with the help of the command to run the document locally: yarn docz:dev Then visit http://localhost:6001 to view the contents of your document

Publish

Before publish, make sure your tests pass before you publish to npm

antd-ui-wrapper's People

Contributors

wbh1328551759 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.