react_library_by_boyiao

1.0.3 • Public • Published

下载

npm i react_library_by_boyiao

使用日历组件 📅

import { Calendar } from "react_library_by_boyiao";

const YourComponent = () => {
  const [keys, setKeys] = useState(["2022-01-01"]);
  const handleSelect = (date: string[]) => {
    setKeys(date);
  };

  return <Calendar selector={{ keys, onSelect: handleSelect }}></Calendar>;
};

目前可用的功能:单选、拖拽多选、翻页

使用图钉组件 📌

import { Thumbtack } from "react_library_by_boyiao";

const YourComponent = () => {
  return (
    <div id="container">
      <div id="targetDOM">这是你想要连接的元素</div>
      <Thumbtack
        popupContainerId="container"
        targetElementId="targetDOM"
      ></Thumbtack>
    </div>
  );
};

Git

https://gitee.com/boyiao/boyiao_react_library

Package Sidebar

Install

npm i react_library_by_boyiao

Weekly Downloads

273

Version

1.0.3

License

MIT

Unpacked Size

312 kB

Total Files

9

Last publish

Collaborators

  • boyiao