1 Star 1 Fork 0

duheng / dux-ui-react

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

dux-ui

基于 React 的前端 UI 库。 It is just for learning.

开发规划

  1. 完善常用组件
  2. 上线 Github 和 npm
  3. 二次封装业务组件

开发记录

  1. 搭建 Dumi 环境
  2. 设置主题配置
  3. 添加 Button 和 Icon 组件
  4. 配置 git-cz
  5. 开发中...

仓库地址

Dux-ui

兼容环境

React 14+, 暂不支持 React18

开发者

启动 doc 服务

npm run docs

部署 doc page

npm run docs:build

npm run docs:deploy

发布 npm

npm run build:babel

npm run build:dist

npm login

npm run release:patch

npm publish

start

执行:npm install --save dux-ui

create-react-app 项目里使用:

import { Button, Icon } from 'dux-ui';

// 使用Icon需要额外引入css
import 'dux-ui/dist/styles/icon.min.css';

function App() {
  const { StyleTypes } = Button;

  return (
    <div className="App">
      <Icon type="loading" />

      {StyleTypes.map((styleType) => (
        <Button
          styleType={styleType}
          key={'key' + styleType}
          onClick={() => console.log('clicked')}
        >
          {styleType}
        </Button>
      ))}
    </div>
  );
}

vite react 项目里试试同上,需要在 vite.config.js 添加配置:

alias: [
  { find: 'dux-ui', replacement: '/node_modules/dux-ui/lib/index.js' },
],
MIT License Copyright (c) 2022 duheng Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

使用react搭建的前端UI库,技术交流使用,不可用作商业用途 展开 收起
TypeScript 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/dh1992/dux-ui-react.git
git@gitee.com:dh1992/dux-ui-react.git
dh1992
dux-ui-react
dux-ui-react
master

搜索帮助