Giter Site home page Giter Site logo

paat-ui's Introduction

paat-ui


我们通常需要在react,antd的基础上封装一些通用的ui组件,现在我们可以把它们抽离出来,才有了我们现在的项目.

  • 通用ui大组件
  • hook集合
  • todo

使用example

npm install paat-ui

import { Login } from 'paat-ui'

注意

因为项目使用hook,如果你看到 报错

原因可参考

当然我们也给出了方案

请检查webpack配置文件或者等同文件加入

import { resolve } from 'path'

alias: {
    React: resolve(__dirname, './node_modules/react'),
    'react-dom': resolve(__dirname, './node_modules/react-dom'),
},

如果还不行,尝试下删除node_modules包 重新装下依赖

theme相关

可参考antd的theme配置,但是由于为了迎合公司图标的问题,针对图标可能需要特殊处理一下

你需要再全局样式加上less文件然后放下如下代码

@import "~antd/lib/style/themes/default.less";
@icon-prefix: ~'nm-icon';
.@{icon-prefix} {
color: @primary-color;
}

当然我们也在寻求更优方案也欢迎give me a idea

todo

  • 优化login组件
  • 优化工作流
  • 增加更多组件
  • 增加通用hook
  • 增加通用方法

paat-ui's People

Contributors

cg669 avatar

Stargazers

 avatar

Watchers

 avatar  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.