Skip to content
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

change tooltip box styling #49

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/components/GooeyPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default function GooeyPopover({
</div>
}
animation="scale"
duration={100}
{...props}
>
<button type="button" onClick={() => setVisible(!visible)}>
Expand Down
21 changes: 9 additions & 12 deletions app/components/GooeyTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@ export function GooeyHelpIcon({
}) {
return (
<GooeyTooltip content={content} placement={placement}>
<i
role="button"
className="fa-regular fa-circle-info position-absolute text-muted"
style={{
right: "-1.5rem",
top: "1px",
}}
/>
<i role="button" className="fa-regular fa-circle-info text-muted ms-1" />
</GooeyTooltip>
);
}
Expand All @@ -39,14 +32,18 @@ export function GooeyTooltip({
});
return (
<>
<Tippy singleton={source} delay={100} interactive />
<Tippy
singleton={source}
animation={"scale"}
duration={80}
delay={100}
interactive
/>
<Tippy
singleton={target}
placement={placement || "auto"}
animation="scale"
arrow
content={
<div className="bg-white p-2 b-1 shadow rounded container-margin-reset gooey-tooltip-box">
<div className="bg-dark p-2 b-1 shadow rounded container-margin-reset gooey-tooltip-box">
<RenderedMarkdown body={content} />
</div>
}
Expand Down
4 changes: 2 additions & 2 deletions app/renderedHTML.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export function RenderedHTML({
if (help) {
parsedElements = (
<div>
<div className="d-inline-block position-relative">
{parsedElements}
<div className="d-flex align-items-baseline position-relative">
<div>{parsedElements}</div>
<GooeyHelpIcon content={help} placement={tooltipPlacement} />
</div>
</div>
Expand Down
8 changes: 6 additions & 2 deletions app/styles/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -896,12 +896,16 @@ button {
.gooey-tooltip-box {
width: max-content;
max-width: 80vw !important;
color: #82878b !important
}

.gooey-tooltip-box * {
color: white !important;
text-decoration-color: #fff !important;
}

@media (min-width: 768px) {
.gooey-tooltip-box{
width: max-content;
max-width: 50vw !important;
max-width: 35vw !important;
}
}