@belong-design/ui 1.0.12 → 1.0.13

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.
@@ -0,0 +1,8 @@
1
+ .index-module_belong-button__98rpn {
2
+ display: inline-block;
3
+ padding: 8px 16px;
4
+ cursor: pointer;
5
+ background-color: red;
6
+ border-color: #1677ff;
7
+ color: white;
8
+ }
@@ -0,0 +1,13 @@
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+
3
+ var styles = {"belong-button":"index-module_belong-button__98rpn"};
4
+
5
+ var Button = function (_a) {
6
+ var onClick = _a.onClick, children = _a.children;
7
+ var handleClick = function (e) {
8
+ onClick === null || onClick === void 0 ? void 0 : onClick(e);
9
+ };
10
+ return (jsxs(Fragment, { children: [jsx("button", { className: styles["belong-button"], onClick: handleClick, children: children }), jsx("div", { children: "\u5566\u5566\u5566\u5566\u5566\u5566\u5566" })] }));
11
+ };
12
+
13
+ export { Button };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@belong-design/ui",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Belong UI component library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "author": "belong",
8
8
  "scripts": {
9
- "build": "tsc"
9
+ "build": "rollup -c"
10
10
  },
11
11
  "peerDependencies": {
12
12
  "react": ">=16",
@@ -16,5 +16,11 @@
16
16
  "@types/react": "^18.0.0",
17
17
  "@types/react-dom": "^18.0.0",
18
18
  "typescript": "^5.9.3"
19
- }
19
+ },
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "files": [
24
+ "dist"
25
+ ]
20
26
  }
@@ -1,33 +0,0 @@
1
- import React from "react";
2
-
3
- interface ButtonProps {
4
- onClick?: React.MouseEventHandler<HTMLButtonElement>;
5
- children?: React.ReactNode;
6
- }
7
-
8
- const Button: React.FC<ButtonProps> = ({ onClick, children }) => {
9
- const handleClick: React.MouseEventHandler<HTMLButtonElement> = (e) => {
10
- onClick?.(e);
11
- };
12
-
13
- return (
14
- <>
15
- <button
16
- style={{
17
- display: "inline-block",
18
- padding: "8px 16px",
19
- cursor: "pointer",
20
- backgroundColor: "red",
21
- borderColor: "#1677ff",
22
- color: "white",
23
- }}
24
- onClick={handleClick}
25
- >
26
- {children}
27
- </button>
28
- <div>啦啦啦啦啦啦啦</div>
29
- </>
30
- );
31
- };
32
-
33
- export default Button;
package/src/index.tsx DELETED
@@ -1 +0,0 @@
1
- export { default as Button } from "./components/Button";
package/tsconfig.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES5",
4
- "module": "ESNext",
5
- "jsx": "react-jsx",
6
- "declaration": true,
7
- "outDir": "dist",
8
- "esModuleInterop": true,
9
- "allowSyntheticDefaultImports": true,
10
- "skipLibCheck": true,
11
- "moduleResolution": "node"
12
- },
13
- "include": [
14
- "src"
15
- ]
16
- }