Skip to content

Commit 20698bd

Browse files
committed
feat: refactor App component to move dismissible alert button to a new position while maintaining functionality
1 parent 0838482 commit 20698bd

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

example/src/App.tsx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -35,31 +35,6 @@ export default function App() {
3535
}}
3636
text="Show 2 Alerts"
3737
/>
38-
<Button
39-
onPress={async () => {
40-
await alert.show({
41-
title: 'Lorem ipsum dolor sit amet',
42-
message: 'I am a dismissible alert',
43-
isDismissible: true,
44-
onDismiss: () => {
45-
alert.success({
46-
message: 'You dismissed the alert',
47-
});
48-
},
49-
buttons: [
50-
{
51-
text: 'OK',
52-
onPress: () => {
53-
alert.success({
54-
message: 'You pressed OK button',
55-
});
56-
},
57-
},
58-
],
59-
});
60-
}}
61-
text="Show Dismissible Alert"
62-
/>
6338
<Button
6439
onPress={() => {
6540
alert.success({
@@ -90,6 +65,31 @@ export default function App() {
9065
}}
9166
text="Show Confirm"
9267
/>
68+
<Button
69+
onPress={async () => {
70+
await alert.show({
71+
title: 'Lorem ipsum dolor sit amet',
72+
message: 'I am a dismissible alert',
73+
isDismissible: true,
74+
onDismiss: () => {
75+
alert.success({
76+
message: 'You dismissed the alert',
77+
});
78+
},
79+
buttons: [
80+
{
81+
text: 'OK',
82+
onPress: () => {
83+
alert.success({
84+
message: 'You pressed OK button',
85+
});
86+
},
87+
},
88+
],
89+
});
90+
}}
91+
text="Show Dismissible Alert"
92+
/>
9393
</View>
9494
</ScrollView>
9595
</SafeAreaView>

0 commit comments

Comments
 (0)