How to trigger the popover using a long press? #5042
Unanswered
Shreyasc13
asked this question in
Q&A
Replies: 2 comments 1 reply
-
You can try this out: function Example() {
return <Box h="60%" w="100%" alignItems="center">
<Popover trigger={({onPress,...triggerProps}) => {
return <Button onLongPress={onPress} {...triggerProps} colorScheme="danger">
Delete Customer
</Button>;
}}>
<Popover.Content accessibilityLabel="Delete Customerd" w="56">
<Popover.Arrow />
<Popover.CloseButton />
<Popover.Header>Delete Customer</Popover.Header>
<Popover.Body>
This will remove all data relating to Alex. This action cannot be
reversed. Deleted data can not be recovered.
</Popover.Body>
<Popover.Footer justifyContent="flex-end">
<Button.Group space={2}>
<Button colorScheme="coolGray" variant="ghost">
Cancel
</Button>
<Button colorScheme="danger">Delete</Button>
</Button.Group>
</Popover.Footer>
</Popover.Content>
</Popover>
</Box>;
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you so much for taking the time to answ my question.
I will try this out and get back.
Regards,
Shreyas C
…On Tue, 26 Jul 2022 at 3:29 PM, Sanna Bara ***@***.***> wrote:
You can try this out:
function Example() {
return <Box h="60%" w="100%" alignItems="center">
<Popover trigger={({onPress,...triggerProps}) => {
return <Button onLongPress={onPress} {...triggerProps} colorScheme="danger">
Delete Customer
</Button>;
}}>
<Popover.Content accessibilityLabel="Delete Customerd" w="56">
<Popover.Arrow />
<Popover.CloseButton />
<Popover.Header>Delete Customer</Popover.Header>
<Popover.Body>
This will remove all data relating to Alex. This action cannot be
reversed. Deleted data can not be recovered.
</Popover.Body>
<Popover.Footer justifyContent="flex-end">
<Button.Group space={2}>
<Button colorScheme="coolGray" variant="ghost">
Cancel
</Button>
<Button colorScheme="danger">Delete</Button>
</Button.Group>
</Popover.Footer>
</Popover.Content>
</Popover>
</Box>;}
—
Reply to this email directly, view it on GitHub
<#5042 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKVN77I6TUL3PQVON73QRXLVV6ZIRANCNFSM5XIOES5Q>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I wanted to trigger the popover when I long press on a button . Is there any way to trigger the popover when we long press on a button?
Beta Was this translation helpful? Give feedback.
All reactions