Wondering what’s next for npm?Check out our public roadmap! »

    react-mc-dnd-frame

    1.0.8 • Public • Published

    react-mc-dnd-frame

    Make react-dnd work for iframe.

    Installation

    Using npm:

    $ npm install --save react-mc-dnd-frame
    

    Usage

    import React, { useContext } from 'react';
    import { FrameContext } from 'react-frame-component';
    
    import Frame from 'react-mc-dnd-frame';
    
    const Content = (props = {}) => {
      const context = useContext(FrameContext);
    
      const {
        document: contextDocument = document,
        window: contextWindow = window,
      } = context;
    
      return (
        <div className="content" {...props} />
      );
    };
    
    const App = (props = {}) => {
      const [value = {}, setValue] = useState({});
    
      return (
        <Frame className="app-frame">
          <Content>content</Content>
        </Frame>
      );
    };
    
    export default App;

    Keywords

    none

    Install

    npm i react-mc-dnd-frame

    DownloadsWeekly Downloads

    0

    Version

    1.0.8

    License

    MIT

    Unpacked Size

    11.8 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar