Skip to content

An open source alternative to Tableau. Embeddable visual analytic

feat: enhance font style for `Tooltip` and `Callout` (#242)

unimu_8330444b2394
diff --git a/packages/graphic-walker/src/components/callout.tsx b/packages/graphic-walker/src/components/callout.tsx
index 5401589d..c979457e 100644
--- a/packages/graphic-walker/src/components/callout.tsx
+++ b/packages/graphic-walker/src/components/callout.tsx
@@ -54,7 +54,7 @@ const Callout = memo<CalloutProps>(function Callout({ target, children, darkMode
root &&
pos &&
createPortal(
- <Bubble role="dialog" dark={darkMode === 'dark'} className="fixed bg-white dark:bg-zinc-900 z-50" style={{ left: pos[0], top: pos[1] + 4 }}>
+ <Bubble role="dialog" dark={darkMode === 'dark'} className="fixed font-sans text-xs bg-white dark:bg-zinc-900 z-50" style={{ left: pos[0], top: pos[1] + 4 }}>
{children}
</Bubble>,
root
diff --git a/packages/graphic-walker/src/components/limitSetting.tsx b/packages/graphic-walker/src/components/limitSetting.tsx
index 5c026dd7..23a1dba4 100644
--- a/packages/graphic-walker/src/components/limitSetting.tsx
+++ b/packages/graphic-walker/src/components/limitSetting.tsx
@@ -24,7 +24,7 @@ export default function LimitSetting(props: { value: number; setValue: (v: numbe
}
}}
/>
- <output className="text-sm ml-1" htmlFor="height">
+ <output className="ml-1" htmlFor="height">
<input
type="checkbox"
className="h-4 w-4 mr-1 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600"
diff --git a/packages/graphic-walker/src/components/sizeSetting.tsx b/packages/graphic-walker/src/components/sizeSetting.tsx
index 78138605..83d7d07e 100644
--- a/packages/graphic-walker/src/components/sizeSetting.tsx
+++ b/packages/graphic-walker/src/components/sizeSetting.tsx
@@ -32,11 +32,11 @@ export const ResizeDialog: React.FC<SizeSettingProps> = (props) => {
setInnerWidth(Math.round(Number(e.target.value) ** 2 * 1000));
}}
/>
- <output className="text-sm ml-1" htmlFor="width">
+ <output className="ml-1" htmlFor="width">
{`${t("width")}: ${innerWidth}`}
</output>
</div>
- <div className=" mt-2">
+ <div className="mt-2">
<input
className="w-full h-2 bg-blue-100 appearance-none"
style={{ cursor: "ew-resize" }}
@@ -50,7 +50,7 @@ export const ResizeDialog: React.FC<SizeSettingProps> = (props) => {
setInnerHeight(Math.round(Number(e.target.value) ** 2 * 1000));
}}
/>
- <output className="text-sm ml-1" htmlFor="height">
+ <output className="ml-1" htmlFor="height">
{`${t("height")}: ${innerHeight}`}
</output>
</div>
diff --git a/packages/graphic-walker/src/components/tooltip.tsx b/packages/graphic-walker/src/components/tooltip.tsx
index 74ed486d..9b3444fa 100644
--- a/packages/graphic-walker/src/components/tooltip.tsx
+++ b/packages/graphic-walker/src/components/tooltip.tsx
@@ -131,7 +131,7 @@ const Tooltip = memo<TooltipProps>(function Tooltip({
root &&
createPortal(
<Bubble
- className={`${darkMode === 'dark' ? 'dark bg-zinc-900' : 'bg-white'} fixed text-xs p-1 px-3 text-gray-500 z-50`}
+ className={`${darkMode === 'dark' ? 'dark bg-zinc-900' : 'bg-white'} font-sans fixed text-xs p-1 px-3 text-gray-500 z-50`}
dark={darkMode === 'dark'}
onMouseOver={() => setHover(true)}
onMouseOut={() => setHover(false)}