-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(UI-1313): add tooltip to sidebar menu items #987
Conversation
src/components/atoms/tooltip.tsx
Outdated
@@ -5,20 +5,20 @@ import { FloatingPortal, offset, useFloating, useHover, useInteractions, shift } | |||
import { TooltipProps } from "@src/interfaces/components"; | |||
import { cn } from "@src/utilities"; | |||
|
|||
export const Tooltip = ({ content, children, variant = "default" }: TooltipProps) => { | |||
export const Tooltip = ({ content, children, variant = "default", position = "top", disabled }: TooltipProps) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export const Tooltip = ({ content, children, variant = "default", position = "top", disabled }: TooltipProps) => { | |
export const Tooltip = ({ content, children, variant = "default", position = "top", hide }: TooltipProps) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
src/components/atoms/tooltip.tsx
Outdated
className={cn("z-40 rounded-md px-3 py-2 text-sm shadow-md", { | ||
"bg-gray-850 text-white": variant === "default", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where variant === error
have gone? 🤔
Also, what do you think if we'll extract the styles into a constant?
const tooltipStyles = {
default: "bg-gray-850 text-white",
error: "bg-red-600 text-white",
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea, refactored
6b7e449
to
21f1e02
Compare
🎉 This PR is included in version 2.141.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
Add tooltip to sidebar menu
Linear Ticket
https://linear.app/autokitteh/issue/UI-1313/menu-hover-with-name-tootlip
What type of PR is this? (check all applicable)