🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

fanyucomponents

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fanyucomponents - npm Package Compare versions

Comparing version
2.10.13
to
2.10.14
+3
-1
dist/components/Modal.d.ts
import React from "react";
import { ModalContainerProps } from "../types";
export declare const useModal: () => {
export declare const useModal: (initOption: {
isShow?: boolean;
}) => {
isShow: boolean;

@@ -5,0 +7,0 @@ Open: () => void;

@@ -7,4 +7,5 @@ import { jsx as _jsx } from "react/jsx-runtime";

import { StateStylesComponent } from "./StateStylesComponent";
export const useModal = () => {
const [isShow, setIsShow] = useState(false);
export const useModal = (initOption) => {
var _a;
const [isShow, setIsShow] = useState((_a = initOption === null || initOption === void 0 ? void 0 : initOption.isShow) !== null && _a !== void 0 ? _a : false);
const Toggle = () => setIsShow((prev) => !prev);

@@ -11,0 +12,0 @@ const Open = () => setIsShow(true);

{
"$schema": "https://json.schemastore.org/package.json",
"name": "fanyucomponents",
"version": "2.10.13",
"version": "2.10.14",
"description": "一款以 純邏輯為核心、無樣式綁定 的 React 元件套件",

@@ -6,0 +6,0 @@ "main": "dist/index.js",

@@ -12,4 +12,4 @@ import React, { useState } from "react";

export const useModal = () => {
const [isShow, setIsShow] = useState<boolean>(false);
export const useModal = (initOption: { isShow?: boolean }) => {
const [isShow, setIsShow] = useState<boolean>(initOption?.isShow ?? false);

@@ -16,0 +16,0 @@ const Toggle = () => setIsShow((prev) => !prev);