Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
c9c59698
Unverified
Commit
c9c59698
authored
Feb 09, 2022
by
Zach Pomerantz
Committed by
GitHub
Feb 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: tooltip overflow and cursor (#3271)
* fix: tooltip cursor * fix: only clip dialog * nit: clean up class name
parent
82896703
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
12 deletions
+7
-12
Dialog.tsx
src/lib/components/Dialog.tsx
+1
-1
Tooltip.tsx
src/lib/components/Tooltip.tsx
+1
-3
Widget.tsx
src/lib/components/Widget.tsx
+5
-8
No files found.
src/lib/components/Dialog.tsx
View file @
c9c59698
...
...
@@ -106,7 +106,7 @@ export default function Dialog({ color, children, onClose = () => void 0 }: Dial
context
.
element
&&
createPortal
(
<
ThemeProvider
>
<
Modal
c
lassName=
"dialog"
c
olor=
{
color
}
ref=
{
dialog
}
>
<
Modal
color=
{
color
}
ref=
{
dialog
}
>
<
OnCloseContext
.
Provider
value=
{
onClose
}
>
{
children
}
</
OnCloseContext
.
Provider
>
</
Modal
>
</
ThemeProvider
>,
...
...
src/lib/components/Tooltip.tsx
View file @
c9c59698
...
...
@@ -21,9 +21,7 @@ export function useTooltip(): [boolean, (show: boolean) => void, TooltipHandlers
}
const
IconTooltip
=
styled
(
IconButton
)
`
:hover {
cursor: help;
}
cursor: help;
`
interface
TooltipProps
{
...
...
src/lib/components/Widget.tsx
View file @
c9c59698
...
...
@@ -10,18 +10,20 @@ import styled, { keyframes, Theme, ThemeProvider } from 'lib/theme'
import
{
PropsWithChildren
,
StrictMode
,
useState
}
from
'
react
'
import
{
Provider
as
ReduxProvider
}
from
'
react-redux
'
import
{
Provider
as
DialogProvider
}
from
'
./Dialog
'
import
{
Modal
,
Provider
as
DialogProvider
}
from
'
./Dialog
'
import
ErrorBoundary
,
{
ErrorHandler
}
from
'
./Error/ErrorBoundary
'
import
WidgetPropValidator
from
'
./Error/WidgetsPropsValidator
'
import
Web3Provider
from
'
./Web3Provider
'
const
slideDown
=
keyframes
`
to {
height: 0;
top: calc(100% - 0.25em);
}
`
const
slideUp
=
keyframes
`
from {
height: 0;
top: calc(100% - 0.25em);
}
`
...
...
@@ -41,15 +43,10 @@ const WidgetWrapper = styled.div<{ width?: number | string }>`
font-variant: none;
height: 368px;
min-width: 300px;
overflow-y: hidden;
padding: 0.25em;
position: relative;
width:
${({
width
})
=>
width
&&
(
isNaN
(
Number
(
width
))
?
width
:
`
${
width
}
px`
)}
;
@supports (overflow: clip) {
overflow-y: clip;
}
* {
box-sizing: border-box;
font-family:
${({
theme
})
=>
theme
.
fontFamily
}
;
...
...
@@ -60,11 +57,11 @@ const WidgetWrapper = styled.div<{ width?: number | string }>`
}
}
.dialog
{
${
Modal
}
{
animation:
${
slideUp
}
0.25s ease-in-out;
}
.dialog
.
${
UNMOUNTING
}
{
${
Modal
}
.
${
UNMOUNTING
}
{
animation:
${
slideDown
}
0.25s ease-in-out;
}
`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment