@itera-web/react-ui-themedown 1.20.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.
package/LICENSE.md ADDED
File without changes
package/README.md ADDED
@@ -0,0 +1 @@
1
+ ### [使用文档](http://iterative.keyboardecho.com/)
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export type IconProps = {
3
+ className?: string;
4
+ };
5
+ export declare const Moon: React.FC<IconProps>;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export type IconProps = {
3
+ className?: string;
4
+ };
5
+ export declare const Sun: React.FC<IconProps>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ declare function ThemeDownCom({ theme, setState }: {
3
+ theme: any;
4
+ setState: any;
5
+ }): React.JSX.Element;
6
+ export declare const ThemeDown: React.MemoExoticComponent<typeof ThemeDownCom>;
7
+ export {};
package/es/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { ThemeDown } from './ThemeDown';
package/es/index.js ADDED
@@ -0,0 +1 @@
1
+ import*as e from"react";import*as t from"@itera-web/react-ui-toggle";var r={d:(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},a={};r.d(a,{K:()=>s});const n=(e=>{var t={};return r.d(t,e),t})({createElement:()=>e.createElement,default:()=>e.default,memo:()=>e.memo});const o=(e=>{var t={};return r.d(t,e),t})({Toggle:()=>t.Toggle});var l=function(e){var t=e.className;return n.createElement("svg",{className:t,height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"}))},m=function(e){var t=e.className;return n.createElement("svg",{className:t,height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},n.createElement("circle",{cx:"12",cy:"12",r:"4"}),n.createElement("path",{d:"M12 2v2"}),n.createElement("path",{d:"M12 20v2"}),n.createElement("path",{d:"m4.93 4.93 1.41 1.41"}),n.createElement("path",{d:"m17.66 17.66 1.41 1.41"}),n.createElement("path",{d:"M2 12h2"}),n.createElement("path",{d:"M20 12h2"}),n.createElement("path",{d:"m6.34 17.66-1.41 1.41"}),n.createElement("path",{d:"m19.07 4.93-1.41 1.41"}))};function c(e){var t=e.theme,r=e.setState;return n.default.createElement("div",{className:"no-drag"},n.default.createElement(o.Toggle,{"aria-label":"切换主题",className:"gap-2",onPressedChange:function(){r({theme:"dark"===t?"light":"dark"})},pressed:"dark"===t},"dark"===t?n.default.createElement(l,{className:"w-6 h-6"}):n.default.createElement(m,{className:"w-7 h-7"})))}var s=(0,n.memo)(c),d=a.K;export{d as ThemeDown};
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@itera-web/react-ui-themedown",
3
+ "description": "主题切换",
4
+ "version": "1.20.0",
5
+ "main": "es/index.js",
6
+ "types": "es/index.d.ts",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "license": "MIT",
11
+ "scripts": {
12
+ "build": "itera-cli package",
13
+ "up": "npm publish"
14
+ },
15
+ "dependencies": {
16
+ "@itera-web/react-ui-toggle": "^1.20.0"
17
+ },
18
+ "peerDependencies": {
19
+ "react": ">=17.0.0",
20
+ "react-dom": ">=17.0.0"
21
+ },
22
+ "devDependencies": {
23
+ "@itera-web/cli": "^1.1.45"
24
+ },
25
+ "gitHead": "691b2592db8668e5d52c9712bb906484b92cb79b"
26
+ }