UNPKG

@mijadesign/mjui-react-taro

Version:

京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序

15 lines (14 loc) 872 B
import { _ as __rest } from "./tslib.es6-iWu3F_1J.js"; import { l } from "./DynamicLoading-BbSSKJQx.js"; /* empty css */ import { Button as Button$1 } from "@nutui/nutui-react-taro"; import classNames from "classnames"; import React, { forwardRef } from "react"; const Button = forwardRef((props, ref) => { const { shape, size = "large", type = "default", className, loading = false, disabled = false, icon = null } = props, rest = __rest(props, ["shape", "size", "type", "className", "loading", "disabled", "icon"]); return React.createElement(Button$1, Object.assign({ ref, className: classNames("mj-button", className), type, size, shape, loading: false, disabled: loading ? true : disabled, icon: loading ? React.createElement(l, { size: 18 }) : icon }, rest), props.children); }); Button.displayName = "MjButton"; export { Button as B };