🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

lofter-material-utils

Package Overview
Dependencies
Maintainers
8
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lofter-material-utils

项目中常用的工具集

latest
npmnpm
Version
1.0.2
Version published
Weekly downloads
8
166.67%
Maintainers
8
Weekly downloads
 
Created
Source

lofter-material-utils

项目中常用的工具集

安装

npm i lofter-material-utils --save

使用文档

useModal(antdModal)

调用showModal方法就可以显示模态框,调用hideModal可关闭

example

import { useModal } from 'lofter-material-utils/lib/hooks/use-modal'
import {
  Modal
} from 'antd'

function MyModal({
  visible,
  onCancel,
  onOk
}: Props) {
  return (
    <Modal
     title="测试弹窗"
     visible={visible}
     onCancel={onCancel}
     onOk={onOk}
    >
      我是弹窗
    </Modal>
  )
}

const [showModal, hideModal] = useModal(MyModal)

FAQs

Package last updated on 29 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts