forked from Uniswap/info
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tracked vs untracked display (Uniswap#337)
* style update on chart * Fix code style issues with ESLint * update tracked warning, switch tables to untracked * Fix code style issues with ESLint Co-authored-by: Lint Action <[email protected]>
- Loading branch information
1 parent
81ff23a
commit 9533f32
Showing
11 changed files
with
172 additions
and
127 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,15 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "pwa-chrome", | ||
"request": "launch", | ||
"name": "Launch Chrome against localhost", | ||
"url": "http://localhost:8080", | ||
"webRoot": "${workspaceFolder}" | ||
} | ||
] | ||
} |
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,40 @@ | ||
import React, { useCallback, useState } from 'react' | ||
import styled from 'styled-components' | ||
import Popover, { PopoverProps } from '../Popover' | ||
|
||
const Wrapper = styled.span` | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
` | ||
|
||
const TooltipContainer = styled.div` | ||
width: 228px; | ||
padding: 0.6rem 1rem; | ||
line-height: 150%; | ||
font-weight: 400; | ||
` | ||
|
||
interface TooltipProps extends Omit<PopoverProps, 'content'> { | ||
text: string | ||
} | ||
|
||
export function Tooltip({ text, ...rest }: TooltipProps) { | ||
return <Popover content={<TooltipContainer>{text}</TooltipContainer>} {...rest} /> | ||
} | ||
|
||
export default function HoverText({ text, children }: { text: string; children: any }) { | ||
const [show, setShow] = useState<boolean>(false) | ||
const open = useCallback(() => setShow(true), [setShow]) | ||
const close = useCallback(() => setShow(false), [setShow]) | ||
|
||
return ( | ||
<Wrapper> | ||
<Tooltip text={text} show={show}> | ||
<Wrapper onMouseEnter={open} onMouseLeave={close}> | ||
{children} | ||
</Wrapper> | ||
</Tooltip> | ||
</Wrapper> | ||
) | ||
} |
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
Oops, something went wrong.