Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

xy-resizable

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xy-resizable

react components resizable

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

使用方式

<Resizeable
    showGuideLine
    direction={["right", "bottom"]}
    enableResizing
    getGuideLineParent={() => document.body}
>
    <div style={{ width: "80%", margin: "10px 0", background: "yellow" }}>
    test
    </div>
</Resizeable>

API

interface ResizeableProps {
  direction?: DirectionType | Array<DirectionType>;
  // 显示resize指导线
  showGuideLine?: boolean;
  // 指定resize指导线挂载的dom元素
  getGuideLineParent?: (currDom: HTMLElement) => any;
  onResizeEnd?: (
    resizedX: number,
    resizedY: number,
    initWidth: number,
    initHeight: number,
    currDom: HTMLElement
  ) => void;
  // 是否resize的同时修改dom size
  enableResizing?: boolean; // enableResizing 开启时,enableAutoResize也将为true
  enableAutoResize?: boolean; // 是否resize后直接修改style生效 默认为true

  children?: React.ReactNode;
}

Keywords

react

FAQs

Package last updated on 03 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts