@chainx/ui

基于 React material ui 开发 https://material-ui.com/

Usage no npm install needed!

<script type="module">
  import chainxUi from 'https://cdn.skypack.dev/@chainx/ui';
</script>

README

Chainx ui

基于 React material ui 开发 https://material-ui.com/

开发调试

yarn run storybook

引入依赖

# 在 chainx ui 中
yanr build --watch
yarn link

# 在你的项目中
yarn link @chainx/ui

自定义样式

  1. theme.ts

  2. makeStyle

link 到项目里面实时开发。

有时候我们需要项目和组件库同时进行开发。此时将组件库作为项目的本地依赖,会极大的方便开发。为此,我们需要以下的几步。

  1. 在组件库目录运行 yarn link
  2. 在项目目录运行 yarn link @chainx/ui
  3. 在组件库运行 npm link {你的项目目录}/node_modules/reactnpm link {你的项目目录}/node_modules/react-dom
  4. 在组件库目录里面运行 yarn build --watch 以便可以实时的构建更改的文件。

发布

yarn publish