1.0.7 • Published 7 years ago
modalable v1.0.7
Installation
npm install modalable --save
or
yarn add modalable
Usage
import { modalable } from 'modalable'
const DemoComponent = () => (
<h3>React Modal HOC Demo</h3>
)
const DemoModalable = modalable(DemoComponent);
class WrappComponent extends PureComponent {
render() {
return (
<div style={{ textAlign: 'center', marginTop: 100 }}>
<DemoModalable ref={node => this.demoModal = node} title="test" />
<a href="javascript:void(0);" onClick={() => this.demoModal.toggleVisible(true)}>Click me</a>
</div>
)
}
}
API
See Ant Design Modal Component Api