Skip to content

Commit

Permalink
feat: toast实例
Browse files Browse the repository at this point in the history
  • Loading branch information
FanFanJUN committed Sep 5, 2024
1 parent 4c3bc8a commit 7072f6d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/pages/Work/ActionSheet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const ActionSheetDemo = () => {
<>
<Cell isLink onClick={() => setIsVisible1(!isVisible1)}>
<View>
<Text>基础用法</Text>
<Text>基础用法 ActionSheet</Text>
</View>
<Text>{val1}</Text>
</Cell>
Expand Down
18 changes: 17 additions & 1 deletion app/pages/Work/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React from 'react';
import ActionSheetDemo from './ActionSheet';
import {StyleSheet, View} from 'react-native';
import {StyleSheet, Text, TouchableOpacity, View} from 'react-native';
import TableDemo from './Table';
import CalendarDemo from './Calendar';
import Toast from '../../component/toast';

const Block = () => {
return <View style={styles.block} />;
Expand All @@ -16,6 +17,21 @@ const index = () => {
<Block />
<CalendarDemo />
<Block />
<TouchableOpacity
activeOpacity={0.8}
onPress={() => {
Toast.show('我是一个提示');
}}
style={{
height: 50,
backgroundColor: 'white',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
borderRadius: 5,
}}>
<Text>点击Toast</Text>
</TouchableOpacity>
</View>
);
};
Expand Down

0 comments on commit 7072f6d

Please sign in to comment.