UNPKG

cjd-parkball

Version:

> 中后台业务组件库,中后台就像公园,进入需要买门票(登录),所以以 Parkball(公园球) 命名,公园内必定捕获!作为一个组件库,提供使用方法文档,方便开发者的调用

44 lines (37 loc) 671 B
--- category: 2 title: 平滑地卸载 title_en: Unmount --- 平滑、自然的卸载提示 ````jsx import { Alert } from 'parkball'; class App extends React.Component { state = { visible: true, } handleClose = () => { this.setState({ visible: false }); } render() { return ( <div> { this.state.visible ? ( <Alert message="Alert Message Text" type="success" closable afterClose={this.handleClose} /> ) : null } <p>placeholder text here</p> </div> ); } } ReactDOM.render( <App />, mountNode); ````