# paat-ui-react

> ---

Latest version **0.1.29** (published 2019-12-19) · 0 weekly downloads

## Install

```sh
npm install paat-ui-react
pnpm add paat-ui-react
yarn add paat-ui-react
bun add paat-ui-react
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.29 |
| Published | 2019-12-19 |
| First published | 2019-12-18 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ant-zhao |

## Links

- npm: https://www.npmjs.com/package/paat-ui-react
- npm.io page: https://npm.io/package/paat-ui-react

## Dependencies (2)

- [normalize.css](https://npm.io/package/normalize.css.md) ^8.0.1
- [react-scripts-ts](https://npm.io/package/react-scripts-ts.md) 3.1.0

## Recent versions

- 0.1.29 (latest) — 2019-12-19
- 0.1.28 — 2019-12-19
- 0.1.27 — 2019-12-18

## README

# paat-ui-react

---

我们通常需要在 react,antd 的基础上封装一些通用的 ui 组件，现在我们可以把它们抽离出来，才有了我们现在的项目.

> -   通用 ui 大组件
> -   hook 集合
> -   todo

## 使用 example

```
npm install paat-ui-react

```

```
import { Login } from 'paat-ui-react'

```

## 注意

因为项目使用 hook，如果你看到
![报错](https://fileserver.paat.com/1e6/1e6dca427dbf3b84af4c087ee55f5540.png)

[原因可参考](https://reactjs.org/warnings/invalid-hook-call-warning.html)

当然我们也给出了方案

#### 请检查 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;
}
.nm-icon-polygon {
stroke: @primary-7;
}
.nm-icon-bold {
color: @primary-7;
}
a {
color: @primary-color;
}
```

#### 当然我们也在寻求更优方案也欢迎 give me a idea

## todo

-   [x] 优化 login 组件
-   [ ] 优化工作流
-   [ ] 增加更多组件
-   [ ] 增加通用 hook
-   [ ] 增加通用方法

---
_Source: https://npm.io/package/paat-ui-react · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
