0.0.25 • Published 1 year ago

react-dialog-mxy v0.0.25

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

react dialog components learn

preview

preview:https://mxyhi.github.io/react-component-learn/

learn react

install

  • npm
npm i react-dialog-mxy
  • yarn
yarn add react-dialog-mxy
  • pnpm
pnpm add react-dialog-mxy

example

import { useState } from 'react';
import { Dialog } from 'react-dialog-mxy';

function App() {
  const [isOpen, setIsOpen] = useState(false);
  return (
    <div>
      <button
        onClick={() => {
          setIsOpen(true);
        }}
        className="bg-blue-500 rounded shadow px-2 py-1 active:bg-blue-600 text-white"
      >
        打开
      </button>
      content
      <Dialog isShow={isOpen} setShow={setIsOpen} title={<h2>标题</h2>}>
        <div>content</div>
      </Dialog>
    </div>
  );
}

export default App;
0.0.25

1 year ago

0.0.24

1 year ago

0.0.23

1 year ago

0.0.22

1 year ago

0.0.21

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago