-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from bunsy-0900/bug/ES-659-v2
ES-659/ES-661: fix truncated icons and popover content
- Loading branch information
Showing
7 changed files
with
89 additions
and
55 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,36 @@ | ||
import { | ||
Popover, | ||
PopoverArrow, | ||
PopoverContent, | ||
PopoverTrigger, | ||
} from "./ui/popover"; | ||
|
||
interface IconLabelPopoverProps { | ||
icon: React.ReactNode; | ||
children: React.ReactNode; | ||
} | ||
|
||
export const IconLabelPopover = ({ icon, children }: IconLabelPopoverProps) => { | ||
return ( | ||
<> | ||
<div className="flex items-center sm:hidden"> | ||
<Popover> | ||
<PopoverTrigger>{icon}</PopoverTrigger> | ||
<PopoverContent side="right" className="text-xs"> | ||
{children} | ||
<PopoverArrow className="fill-[#FFFFFF] stroke-[#BCBCBC]" /> | ||
</PopoverContent> | ||
</Popover> | ||
</div> | ||
<div className="hidden items-center sm:flex"> | ||
<Popover> | ||
<PopoverTrigger>{icon}</PopoverTrigger> | ||
<PopoverContent side="bottom" className="text-xs"> | ||
{children} | ||
<PopoverArrow className="fill-[#FFFFFF] stroke-[#BCBCBC]" /> | ||
</PopoverContent> | ||
</Popover> | ||
</div> | ||
</> | ||
); | ||
}; |
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