Fix scrubber popup theme

This commit is contained in:
Zoe Roux 2024-01-28 18:51:39 +01:00
parent 0cc6274894
commit 90498eb117
2 changed files with 11 additions and 2 deletions

View File

@ -178,7 +178,7 @@ export const ContrastArea = ({
contrastText, contrastText,
}: { }: {
children: ReactNode | YoshikiFunc<ReactNode>; children: ReactNode | YoshikiFunc<ReactNode>;
mode?: "light" | "dark" | "user"; mode?: "light" | "dark" | "user" | "alternate";
contrastText?: boolean; contrastText?: boolean;
}) => { }) => {
const oldTheme = useTheme(); const oldTheme = useTheme();

View File

@ -19,6 +19,9 @@
*/ */
import { Theme } from "yoshiki/native"; import { Theme } from "yoshiki/native";
import { Tooltip as RTooltip } from "react-tooltip";
import { forwardRef } from "react";
import { ContrastArea } from "./themes";
export const tooltip = (tooltip: string, up?: boolean) => ({ export const tooltip = (tooltip: string, up?: boolean) => ({
dataSet: { dataSet: {
@ -43,4 +46,10 @@ export const WebTooltip = ({ theme }: { theme: Theme }) => {
); );
}; };
export { Tooltip } from "react-tooltip"; export const Tooltip = forwardRef(function Tooltip(props, ref) {
return (
<ContrastArea mode="alternate">
<RTooltip {...props} ref={ref} />
</ContrastArea>
);
}) as typeof RTooltip;