fix: baidu search bug

- reported via google chrome store reviews
Co-authored-by: David Ralph <me@davidcralph.co.uk>
This commit is contained in:
alexsparkes
2022-10-18 20:17:54 +01:00
parent 482095ca65
commit 8304c27fe2
3 changed files with 51 additions and 11 deletions

View File

@@ -2,7 +2,7 @@ import { useState } from 'react';
import { useFloating, flip, offset, shift } from '@floating-ui/react-dom';
import './tooltip.scss';
export default function Tooltip({ children, title, style, placement }) {
export default function Tooltip({ children, title, style, placement, subtitle }) {
const [showTooltip, setShowTooltip] = useState(false);
const { x, y, reference, floating, strategy } = useFloating({
placement: placement || 'bottom',
@@ -27,10 +27,13 @@ export default function Tooltip({ children, title, style, placement }) {
position: strategy,
top: y ?? '',
left: x ?? '',
display: 'flex',
flexFlow: 'column',
}}
className="tooltipTitle"
>
{title}
<span style={{ fontSize: '8px'}}>{subtitle}</span>
</span>
)}
</div>