belong-ui-lib 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button/index.d.ts +10 -0
- package/dist/components/Button/index.js +16 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './button.css';
|
|
3
|
+
type ButtonType = 'default' | 'primary' | 'dashed' | 'text';
|
|
4
|
+
interface ButtonProps {
|
|
5
|
+
type?: ButtonType;
|
|
6
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const Button: React.FC<ButtonProps>;
|
|
10
|
+
export default Button;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import './button.css';
|
|
3
|
+
var Button = function (_a) {
|
|
4
|
+
var _b = _a.type, type = _b === void 0 ? 'default' : _b, onClick = _a.onClick, children = _a.children;
|
|
5
|
+
var className = [
|
|
6
|
+
'ant-btn',
|
|
7
|
+
"ant-btn-".concat(type),
|
|
8
|
+
]
|
|
9
|
+
.filter(Boolean)
|
|
10
|
+
.join(' ');
|
|
11
|
+
var handleClick = function (e) {
|
|
12
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
13
|
+
};
|
|
14
|
+
return (_jsx("button", { className: className, onClick: handleClick, children: children }));
|
|
15
|
+
};
|
|
16
|
+
export default Button;
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Button } from "./Button";
|
|
1
|
+
export { default as Button } from "./components/Button";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Button } from "./Button";
|
|
1
|
+
export { default as Button } from "./components/Button";
|