Socket
Socket
Sign inDemoInstall

xy-resizable

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    xy-resizable

react components resizable


Version published
Maintainers
1
Install size
17.2 kB
Created

Readme

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

FAQs

Last updated on 03 May 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc