Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dt-react-component

Package Overview
Dependencies
Maintainers
5
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dt-react-component

react-component

  • 1.4.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
increased by7.14%
Maintainers
5
Weekly downloads
 
Created
Source

dt-react-component | CHANGELOG

组件库

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

:zap: 安装

使用 npm

npm i dt-react-component --save

:book: 如何使用

  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 打包单独出组件样式文件


:wrench: 本地开发

clone & npm install

git clone git@github.com: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

:ferris_wheel: 预览地址

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

:blue_book: 相关资料

Keywords

FAQs

Package last updated on 21 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc