-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add description tooltips for variable axis
- Loading branch information
Showing
4 changed files
with
96 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { ActionIcon, Tooltip } from '@mantine/core'; | ||
|
||
import { IconInfo } from '@/components/icons'; | ||
|
||
interface InfoTooltipProps { | ||
label: string; | ||
} | ||
export const InfoTooltip = ({ label }: InfoTooltipProps) => { | ||
return ( | ||
<Tooltip | ||
multiline | ||
width={240} | ||
withArrow | ||
transitionProps={{ duration: 200 }} | ||
label={label} | ||
> | ||
<ActionIcon variant="transparent" color="gray" radius="xl"> | ||
<IconInfo height={18} /> | ||
</ActionIcon> | ||
</Tooltip> | ||
); | ||
}; |
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,50 @@ | ||
import { useMantineTheme } from '@mantine/core'; | ||
|
||
import type { IconProps } from './types'; | ||
|
||
const IconInfo = ({ height, ...others }: IconProps) => { | ||
const theme = useMantineTheme(); | ||
const stroke = | ||
theme.colorScheme === 'dark' ? theme.colors.text[0] : theme.colors.text[1]; | ||
|
||
return ( | ||
<svg | ||
height={height} | ||
viewBox="0 0 20 20" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
{...others} | ||
> | ||
<g clip-path="url(#clip0_211_1023)"> | ||
<path | ||
d="M10 18.3333C14.6024 18.3333 18.3333 14.6024 18.3333 9.99999C18.3333 5.39762 14.6024 1.66666 10 1.66666C5.39763 1.66666 1.66667 5.39762 1.66667 9.99999C1.66667 14.6024 5.39763 18.3333 10 18.3333Z" | ||
stroke={stroke} | ||
strokeWidth="1.5" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
<path | ||
d="M10 13.3333V10" | ||
stroke={stroke} | ||
strokeWidth="1.5" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
<path | ||
d="M10 6.66666H10.01" | ||
stroke="#01112C" | ||
strokeWidth="1.5" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
</g> | ||
<defs> | ||
<clipPath id="clip0_211_1023"> | ||
<rect width="20" height="20" fill="white" /> | ||
</clipPath> | ||
</defs> | ||
</svg> | ||
); | ||
}; | ||
|
||
export { IconInfo }; |
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