sixseconds-modules 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,6 @@
1
+ import { default as React } from 'react';
2
+ export interface ButtonProps {
3
+ label: string;
4
+ onClick?: () => void;
5
+ }
6
+ export declare const Button: React.FC<ButtonProps>;
@@ -0,0 +1 @@
1
+ export declare const useToggle: (initial?: boolean) => readonly [boolean, () => void];
@@ -0,0 +1,2 @@
1
+ export * from './hooks/useToggle';
2
+ export * from './components/Button';
package/dist/my-lib.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),r=(e=!1)=>{const[t,n]=o.useState(e);return[t,()=>n(!t)]},s=({label:e,onClick:t})=>o.createElement("button",{style:{padding:"8px 16px",backgroundColor:"blue",color:"white"},onClick:t},e);exports.Button=s;exports.useToggle=r;
@@ -0,0 +1,16 @@
1
+ import n, { useState as r } from "react";
2
+ const a = (e = !1) => {
3
+ const [t, o] = r(e);
4
+ return [t, () => o(!t)];
5
+ }, c = ({ label: e, onClick: t }) => /* @__PURE__ */ n.createElement(
6
+ "button",
7
+ {
8
+ style: { padding: "8px 16px", backgroundColor: "blue", color: "white" },
9
+ onClick: t
10
+ },
11
+ e
12
+ );
13
+ export {
14
+ c as Button,
15
+ a as useToggle
16
+ };
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "sixseconds-modules",
3
+ "version": "1.0.0",
4
+ "main": "dist/my-lib.cjs.js",
5
+ "module": "dist/my-lib.es.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/my-lib.es.js",
14
+ "require": "./dist/my-lib.cjs.js"
15
+ },
16
+ "./package.json": "./package.json"
17
+ },
18
+ "scripts": {
19
+ "build": "vite build",
20
+ "dev": "vite"
21
+ },
22
+ "keywords": [],
23
+ "author": "",
24
+ "license": "ISC",
25
+ "description": "",
26
+ "peerDependencies": {
27
+ "react": "^18.0.0",
28
+ "react-dom": "^18.0.0"
29
+ },
30
+ "devDependencies": {
31
+ "@types/node": "^22.15.3",
32
+ "@types/react": "^18.0.0",
33
+ "@types/react-dom": "^18.0.0",
34
+ "react": "^18.0.0",
35
+ "react-dom": "^18.0.0",
36
+ "typescript": "^5.8.3",
37
+ "vite": "^6.3.3",
38
+ "vite-plugin-dts": "^4.5.3"
39
+ },
40
+ "dependencies": {
41
+ "react": "^18.0.0",
42
+ "react-dom": "^18.0.0"
43
+ }
44
+ }