belong-ui-lib 1.0.0

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,7 @@
1
+ import React from "react";
2
+ export interface ButtonProps {
3
+ text: string;
4
+ onClick?: () => void;
5
+ }
6
+ declare const Button: React.FC<ButtonProps>;
7
+ export default Button;
package/dist/Button.js ADDED
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ var Button = function (_a) {
3
+ var text = _a.text, onClick = _a.onClick;
4
+ return (React.createElement("button", { style: { padding: "8px 16px", cursor: "pointer" }, onClick: onClick }, text));
5
+ };
6
+ export default Button;
@@ -0,0 +1 @@
1
+ export { default as Button } from "./Button";
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export { default as Button } from "./Button";
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "belong-ui-lib",
3
+ "version": "1.0.0",
4
+ "description": "belong-ui-lib",
5
+ "main": "index.js",
6
+ "author": "belong",
7
+ "scripts": {
8
+ "build": "tsc"
9
+ },
10
+ "dependencies": {
11
+ "react": "^19.2.3",
12
+ "react-dom": "^19.2.3"
13
+ },
14
+ "devDependencies": {
15
+ "@types/react": "^19.2.7",
16
+ "@types/react-dom": "^19.2.3",
17
+ "typescript": "^5.9.3"
18
+ },
19
+ "peerDependencies": {
20
+ "react": ">=16",
21
+ "react-dom": ">=16"
22
+ }
23
+ }
package/src/Button.tsx ADDED
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+
3
+ export interface ButtonProps {
4
+ text: string;
5
+ onClick?: () => void;
6
+ }
7
+
8
+ const Button: React.FC<ButtonProps> = ({ text, onClick }) => {
9
+ return (
10
+ <button
11
+ style={{ padding: "8px 16px", cursor: "pointer" }}
12
+ onClick={onClick}
13
+ >
14
+ {text}
15
+ </button>
16
+ );
17
+ };
18
+
19
+ export default Button;
package/src/index.tsx ADDED
@@ -0,0 +1 @@
1
+ export { default as Button } from "./Button";
package/tsconfig.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES5",
4
+ "module": "ESNext",
5
+ "jsx": "react",
6
+ "declaration": true,
7
+ "outDir": "dist",
8
+ "strict": true,
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true
11
+ },
12
+ "include": [
13
+ "src"
14
+ ]
15
+ }