import React, { Component } from 'react' import { StyleSheet, View, Text, Image } from 'react-native' import { ScrollView } from 'react-native-gesture-handler'; import { height, px2dp, width } from '../../utils/base'; export interface Props { } export interface State { } export default class ActionSheetTest extends React.Component { constructor(props: Props | Readonly) { super(props); } componentDidMount() { } componentWillUnmount() { } public readonly state: Readonly = { } public ActionSheet = null show = () => { this.ActionSheet.show() } render() { return ( Open ActionSheet this.ActionSheet = o} title={'Which one do you like ?'} options={['Apple', 'Banana', 'a', 'b', 'c', '关闭']} cancelButtonIndex={2} destructiveButtonIndex={1} onPress={(index) => { /* do something */ }} style={{ height: px2dp(700) }} /> ); } } const styles = StyleSheet.create({ main: { } })