1.0.0 • Published 4 years ago

@jswork/react-ant-image-pop-view v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

react-ant-image-pop-view

Ant popover view image for react.

version license size download

installation

npm install -S @jswork/react-ant-image-pop-view

properties

NameTypeRequiredDefaultDescription
classNamestringfalse-The extended className for component.
placementstringfalse'rightTop'Placement for antd.
sizearrayfalse100Thumbnail size.
popSizearrayfalse100Popup picture size.
thumbnailstringfalse-The thumbnail/popup pictures.
srcstringtrue-The popup original picutrel.

usage

  1. import css

    @import "~@jswork/react-ant-image-pop-view/dist/style.css";
    
    // or use sass
    @import "~@jswork/react-ant-image-pop-view/dist/style.scss";
    
    // customize your styles:
    $react-ant-image-pop-view-options: ()
  2. import js

    import ReactDemokit from '@jswork/react-demokit';
    import React from 'react';
    import ReactDOM from 'react-dom';
    import NxRandomAvatar from '@jswork/next-random-avatar';
    import ReactAntImagePopView from '@jswork/react-ant-image-pop-view';
    import './assets/style.scss';
    
    class App extends React.Component {
      render() {
        const img = NxRandomAvatar.lego();
        return (
          <ReactDemokit
            className="p-3 app-container"
            url="https://github.com/afeiship/react-ant-image-pop-view">
            <ReactAntImagePopView
              thumbnail={img}
              src={img}
              size={[100, 100]}
              popSize={[300, 300]}
            />
          </ReactDemokit>
        );
      }
    }
    
    ReactDOM.render(<App />, document.getElementById('app'));

documentation

license

Code released under the MIT license.