-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds info for fields, visual changes
- Loading branch information
1 parent
a713fed
commit 27ef6f0
Showing
10 changed files
with
240 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { Icon } from '@/lib/Icon'; | ||
import * as Popover from '@radix-ui/react-popover'; | ||
export const InfoPopover = ({ | ||
tips, | ||
link, | ||
}: { | ||
tips: string; | ||
link?: string; | ||
}) => { | ||
return ( | ||
<Popover.Root modal={true}> | ||
<Popover.Trigger asChild> | ||
<button className='IconButton' aria-label='Update dimensions'> | ||
<Icon name='info' /> | ||
</button> | ||
</Popover.Trigger> | ||
|
||
<Popover.Portal> | ||
<Popover.Content | ||
style={{ position: 'absolute' }} | ||
className='PopoverContent' | ||
side='right' | ||
sideOffset={5} | ||
> | ||
<div | ||
style={{ | ||
border: '1px solid #d9d7d7', | ||
boxShadow: '0 0 10px #d9d7d7', | ||
padding: '0.5rem', | ||
borderRadius: '0.5rem', | ||
minWidth: '15rem', | ||
}} | ||
> | ||
<p className='Text' style={{ fontSize: 13 }}> | ||
{tips} | ||
</p> | ||
|
||
{link && ( | ||
<a | ||
Check warning Code scanning / CodeQL Potentially unsafe external link Medium
External links without noopener/noreferrer are a potential security risk.
|
||
href={link} | ||
target='_blank' | ||
style={{ color: '#0070f3', fontSize: 13 }} | ||
> | ||
Click here for more info. | ||
</a> | ||
)} | ||
</div> | ||
</Popover.Content> | ||
</Popover.Portal> | ||
</Popover.Root> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.