GithubHelp home page GithubHelp logo

andyzjy / dt-react-component Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dtstack/dt-react-component

2.0 0.0 0.0 10.89 MB

基于 antd 封装的 React UI 组件库

Home Page: https://github.com/DTStack/dt-react-component

JavaScript 2.10% Shell 0.68% TypeScript 91.98% CSS 5.25%

dt-react-component's Introduction

dt-react-component | CHANGELOG

组件库

目的:减少代码重复率,便于新同学对组件使用以及团队内部项目的代码优化

⚡ 安装

使用 npm

npm i dt-react-component --save

📖 如何使用

  1. Usage
import { Circle, GoBack } from 'dt-react-component'
const App = () => (
  <>
    <Circle />
    <GoBack url='/api/manage' />
  </>
);

样式引入:

import 'dt-react-component/lib/index.css'
  1. 按需引入
import { Circle } from 'dt-react-component/lib/circle'

样式暂时还是必须全量引入:

import 'dt-react-component/lib/index.css'

目前这块打包出来的样式暂不支持单文件引入,这块后续有时间使用 gulp/webpack 打包单独出组件样式文件


🔧 本地开发

clone & npm install

git clone [email protected]:DTStack/dt-react-component.git
npm install

启动本地服务器

 npm run storybook

组件开发

  • src/components 目录下编写组件
  • src/stories 目录下编写 storybook 文档
  • npm run storybook 本地文档预览

静态服务部署构建

npm run build-storybook

组件发布至 npm 在按照一些列组件开发规范流程下,测试组件无问题后进行组件发布

npm run compile 输出 lib 目录
登陆 npm 执行 npm publish

🎡 预览地址

https://dtstack.github.io/dt-react-component/

📘 相关资料

dt-react-component's People

Contributors

zhangtengjin avatar mumiao avatar wewoor avatar nankanull avatar

Stargazers

jist avatar Roman avatar Jerome 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.