-
Notifications
You must be signed in to change notification settings - Fork 28
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
Questionmark tooltip #325
Questionmark tooltip #325
Changes from 4 commits
6a08f95
173e206
f42443c
7bd0f46
3e0113e
1320457
c2fc7df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import type React from "react"; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
import { faInfoCircle } from '@fortawesome/free-solid-svg-icons'; | ||
import Tooltip from 'rc-tooltip'; | ||
import clsx from 'clsx'; | ||
|
||
|
||
const InfoTooltip = ({ | ||
className, | ||
tooltip, | ||
} : { | ||
className?: string, | ||
tooltip: string, | ||
}) => { | ||
return ( | ||
<> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would be nice to remove the unneeded fragment <> </> |
||
<Tooltip | ||
overlay={<span>{tooltip}</span>} | ||
placement="top" | ||
showArrow={false} | ||
trigger={['hover']} | ||
mouseEnterDelay={0} | ||
> | ||
<FontAwesomeIcon | ||
icon={faInfoCircle} | ||
className={clsx(className, "mt-[3px] text-gray-400")} | ||
/> | ||
</Tooltip> | ||
</> | ||
) | ||
} | ||
|
||
export default InfoTooltip; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's remove these accidentally created package.json files |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
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.
might be nice to use just 1 prop for tooltip,
since we want to enable tooltip if and only if we have tooltip text