1.0.2 • Published 3 years ago

@songjp/mie-ui v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

@songjp/mie-ui

个人的 React UI Library, 主要用于学习 father-build 打包组件库的流程

1. 使用

安装:

yarn add @songjp/mie-ui

使用方式:
目前打包除了 es 目录(esm 模块), lib 目录(cjs 模块) 以及 dist 目录(umd) 模块。

// 方式1: import
import '@songjp/mie-ui/es/avatar.css'  // 单独加载组件的 css
import { Avatar } from '@songjp/mie-ui'

<Avatar>J</Avatar>

// 方式2: UMD
<script src="node_modules/react/umd/react.development.js"></script>
<script src="node_modules/react-dom/umd/react-dom.development.js"></script>
<script>
  ReactDOM.render(
      React.createElement(miemie.tooltip, {
        title: '我是文本 的 Tooltip',
        // other props
      },
      '我是 children'
    ), document.querySelector('#root')
  )
</script>