@jswork/react-upload-weibo-media

    1.0.1 • Public • Published

    react-upload-weibo-media

    React upload media.

    version license size download

    installation

    npm install -S @jswork/react-upload-weibo-media

    properties

    Name Type Required Default Description
    className string false - The extended className for component.
    value string false - Default value.
    onChange func false noop The change handler.
    size array false ['100%', '180px'] The media(image) size.
    inputable bool false false If input control use text diretly.

    usage

    1. import css
    @import "~@jswork/react-figure/dist/style.scss";
    @import "~@jswork/wsui-frame-wrapper/dist/index.scss";
    @import "~@jswork/react-upload-weibo-media/dist/style.scss";
    
    // customize your styles:
    $react-upload-weibo-media-options: ()
    1. import js
    import ReactDemokit from '@jswork/react-demokit';
    import React from 'react';
    import ReactDOM from 'react-dom';
    import ReactUploadWeiboMedia from '@jswork/react-upload-weibo-media';
    import './assets/style.scss';
    
    class App extends React.Component {
      state = {
        token:
          'SUB=_2A25NRDndDeRhGeVI7VMZ8yzEyz-IHXVuMCwVrDV_PUNbm9AfLVX9kW9NTBpP0WiKCSBlMw7oSMG7Zy0nrMofP6ea',
        value: ''
      };
    
      _onChange = (inEvent) => {
        console.log(inEvent);
      };
    
      render() {
        return (
          <ReactDemokit
            className="p-3 app-container"
            url="https://github.com/afeiship/react-upload-weibo-media">
            <ReactUploadWeiboMedia
              onChange={this._onChange}
              value={this.state.value}
              token={this.state.token}
            />
          </ReactDemokit>
        );
      }
    }
    
    ReactDOM.render(<App />, document.getElementById('app'));

    documentation

    license

    Code released under the MIT license.

    Install

    npm i @jswork/react-upload-weibo-media

    DownloadsWeekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    28.7 kB

    Total Files

    7

    Last publish

    Collaborators

    • afeiship