1.4.3 • Published 1 year ago

vvmodal v1.4.3

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

下载使用

文档地址

npm i vvmodal

最简单的使用方法

import { antdModal, createGlobalModal, useModal, VVModalProvider } from "vvmodal";
import { Button, Modal } from "antd";

const Modal = createGlobalModal(() => {
  const modal = useModal();
  return (
    <Modal {...antdModal(modal)}>
      使用vvmodal管理modal状态
    </Modal>
  )
})

function App() {
  return (
    <VVModalProvider>
      <Button onClick={() => Modal.show()}>点击展示</Button>
    </VVModalProvider>
  )
}

灵感来自于nice-modal-react

1.4.3

1 year ago

1.4.2

1 year ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.0.0

2 years ago