mirror of
https://github.com/mue/mue.git
synced 2026-07-13 12:07:45 +02:00
fix: baidu search bug
- reported via google chrome store reviews Co-authored-by: David Ralph <me@davidcralph.co.uk>
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user