fix: tooltip width photoinformation

This commit is contained in:
alexsparkes
2022-11-16 08:44:10 +00:00
parent b256387410
commit f24d1949ba
2 changed files with 23 additions and 11 deletions

View File

@@ -10,16 +10,18 @@ function Tooltip({ children, title, style, placement, subtitle }) {
});
return (
<div
className="tooltip"
style={style}
onMouseEnter={() => setShowTooltip(true)}
onMouseLeave={() => setShowTooltip(false)}
onFocus={() => setShowTooltip(true)}
onBlur={() => setShowTooltip(false)}
ref={reference}
>
{children}
<>
<div
className="tooltip"
style={style}
onMouseEnter={() => setShowTooltip(true)}
onMouseLeave={() => setShowTooltip(false)}
onFocus={() => setShowTooltip(true)}
onBlur={() => setShowTooltip(false)}
ref={reference}
>
{children}
</div>
{showTooltip && (
<span
ref={floating}
@@ -36,7 +38,7 @@ function Tooltip({ children, title, style, placement, subtitle }) {
<span style={{ fontSize: '8px' }}>{subtitle}</span>
</span>
)}
</div>
</>
);
}

View File

@@ -199,6 +199,7 @@
.photoInformation {
@extend %basic;
animation: fadeIn 2s;
min-width: 300px;
font-size: 0.8em;
font-weight: 300;
@@ -361,3 +362,12 @@
@include basicIconButton(11px, 1.3rem, ui);
}
}
@keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}