Skip to content

Commit

Permalink
Replace HoverCard with Popover on SuccessAlert
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-walker committed Apr 9, 2024
1 parent 15ab667 commit ce7981a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/src/components/SuccessAlert.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useClipboard } from '@mantine/hooks';
import { Alert, Text, HoverCard, Button, Group, Space } from '@mantine/core';
import { Alert, Text, Popover, Button, Group, Space } from '@mantine/core';
import { CheckCircle } from 'react-feather';
import { AwesomeQRCode } from "@awesomeqr/react";
import urljoin from 'url-join';
Expand Down Expand Up @@ -30,13 +30,13 @@ export function SuccessAlert({ response, clear, ...props }) {
<Button color="green" onClick={() => clipboard.copy(url)}>
{clipboard.copied ? 'Copied' : 'Copy'}
</Button>
<HoverCard shadow="md" withinPortal={true}>
<HoverCard.Target>
<Popover shadow="md" position="bottom" withArrow withinPortal={true}>
<Popover.Target>
<Button variant="subtle" color="green">
Show QR
</Button>
</HoverCard.Target>
<HoverCard.Dropdown>
</Popover.Target>
<Popover.Dropdown>
<div style={{ width: '300px', height: '300px' }}>
<AwesomeQRCode options={{
text: url,
Expand All @@ -50,8 +50,8 @@ export function SuccessAlert({ response, clear, ...props }) {
cornerAlignment: { scale: 1, protectors: false }
}}} />
</div>
</HoverCard.Dropdown>
</HoverCard>
</Popover.Dropdown>
</Popover>
</Group>
</Alert>
)
Expand Down

0 comments on commit ce7981a

Please sign in to comment.