Skip to content

Commit

Permalink
style(cell): error tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
121watts committed Jun 20, 2019
1 parent 383c3c1 commit 2e6202b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
12 changes: 0 additions & 12 deletions ui/src/shared/components/EmptyGraphError.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,4 @@
.empty-graph-error--icon {
display: inline-block;
margin-right: $ix-marg-b;
}

.empty-graph-error--copy {
position: absolute;
top: $ix-marg-b;
right: $ix-marg-b;
opacity: 0.9;
display: none;

.empty-graph-error:hover & {
display: inherit;
}
}
7 changes: 1 addition & 6 deletions ui/src/shared/components/EmptyGraphErrorTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ const EmptyGraphError: FunctionComponent<Props> = ({message, testID}) => {
color={ComponentColor.Danger}
>
<pre>
<span
className={`icon ${
IconFont.AlertTriangle
} empty-graph-error--icon`}
/>
<code>{message}</code>
<CopyToClipboard text={message}>
<Button
size={ComponentSize.ExtraSmall}
Expand All @@ -68,6 +62,7 @@ const EmptyGraphError: FunctionComponent<Props> = ({message, testID}) => {
className="empty-graph-error--copy"
/>
</CopyToClipboard>
<code>{message}</code>
</pre>
</BoxTooltip>
)}
Expand Down
10 changes: 6 additions & 4 deletions ui/src/shared/components/cells/Cell.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ $cell--header-size: 36px;
}
}

.empty-graph-error--copy {
z-index: 1;
float: right;
}

.cell--view-empty {
width: 100%;
height: 100%;
Expand All @@ -47,11 +52,8 @@ $cell--header-size: 36px;
padding: 0 $ix-marg-d $ix-marg-d $ix-marg-d;
overflow: hidden;

.empty-graph-error--copy {
z-index: 1;
}

&.error {
font-size: 40px;
color: $c-dreamsicle;
}
}
Expand Down

0 comments on commit 2e6202b

Please sign in to comment.