nights-ui
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

Nights UI

一个好用的 UI 框架。Nice UI

Modal

props type
visible boolean
title string
okText string
cancelText string
onOk () => void
onCancel () => void
children string || JSX
maskable boolean
footer boolean
className string
wrapClassName string
width number
height number
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"
        width={400}
        height={200}
        maskable
        onCancel={() => {
          setVisible(false);
        }}
      >
        hello world!
      </NiceModal>
    </div>
  );
}

Button

props type
type primary success warning danger link default
size middle small large
disabled boolean
ripple boolean
circle boolean
onClick () => void
children string
icon icon-search icon-unfold icon-up_arrow icon-right_arrow icon-down_arrow icon-left-arrow icon-delete ....
import { NiceButton } from "nights-ui";

function Index() {
  const handleClick = () => {
    alert("click me");
  };
  return (
    <NiceButton
      type="primary"
      size="middle"
      icon="icon-search"
      onClick={handleClick}
    >
      alert
    </NiceButton>
  );
}

未完待续...

Package Sidebar

Install

npm i nights-ui

Weekly Downloads

0

Version

1.0.8

License

ISC

Unpacked Size

69.5 kB

Total Files

36

Last publish

Collaborators

  • zykee
  • baiyang_796