Skip to content

Commit

Permalink
Merge pull request #1442 from gluestack/fix/alertd-demo
Browse files Browse the repository at this point in the history
fix: alertdialogdemo
  • Loading branch information
amars29 authored Dec 5, 2023
2 parents dec1ecf + a012bc3 commit dd1bf12
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ import {

const AlertDialogDemo = () => {
const [showAlertDialog, setShowAlertDialog] = React.useState(true);
const [showButton, setShowButton] = React.useState(false);
return (
<>
<Button
display={showButton ? 'flex' : 'none'}
display={!showAlertDialog ? 'flex' : 'none'}
onPress={() => {
setShowAlertDialog(true);
setShowButton(false);
}}
>
<ButtonText>Click me</ButtonText>
Expand All @@ -44,8 +42,8 @@ const AlertDialogDemo = () => {
<HStack space="sm" alignItems="center">
<Icon
as={CheckCircleIcon}
w={18}
h={18}
width={18}
height={18}
color="$success700"
sx={{
_dark: {
Expand All @@ -66,7 +64,6 @@ const AlertDialogDemo = () => {
action="secondary"
onPress={() => {
setShowAlertDialog(false);
setShowButton(true);
}}
>
<ButtonText>Okay</ButtonText>
Expand Down

0 comments on commit dd1bf12

Please sign in to comment.