https://github.com/newraina/react-actionsheet
https://github.com/newraina/react-actionsheet
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/newraina/react-actionsheet
- Owner: newraina
- Created: 2016-11-16T05:44:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T17:53:22.000Z (over 3 years ago)
- Last Synced: 2025-01-09T08:12:26.662Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1.28 MB
- Stars: 7
- Watchers: 3
- Forks: 5
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-actionsheet
# Installation
```
npm i react-actionsheet --save
```
# Demo

```javascript
class App extends Component {
state = {
show: false
}
onClick = () => {
const { show } = this.state
this.setState({show: !show})
}
onRequestClose = () => {
this.onClick()
}
render() {
const { show } = this.state
const tip = show ? '隐藏' : '显示'
const menus = [{content: '点我'}, {content: '不要点我'}]
return (
{tip}
)
}
}
```