2.0.3 • Published 6 days ago

nights-ui v2.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
6 days ago

Nights UI

一个好用的 UI 框架。Nice UI

Modal

propstype
visibleboolean
titlestring
okTextstring
cancelTextstring
onOk() => void
onCancel() => void
childrenstring || JSX
maskableboolean
import { NiceModal } from "nights-ui";

function Index() {
  const [visible, setVisible] = useState(false);
  return (
    <div>
      <button
        onClick={() => {
          setVisible(true);
        }}
      >
        open
      </button>
      <NiceModal
        visible={visible}
        title="nice modal1"
        maskable
        onCancel={() => {
          setVisible(false);
        }}
      >
        hello world!
      </NiceModal>
    </div>
  );
}

未完待续...