react-ant-image-pop-view
Ant popover view image for react.
installation
npm install -S @jswork/react-ant-image-pop-view
properties
Name | Type | Required | Default | Description |
---|---|---|---|---|
className | string | false | - | The extended className for component. |
placement | string | false | 'rightTop' | Placement for antd. |
size | array | false | [100] | Thumbnail size. |
popSize | array | false | [100] | Popup picture size. |
thumbnail | string | false | - | The thumbnail/popup pictures. |
src | string | true | - | The popup original picutrel. |
usage
- 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: ()
- 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.