Skip to content

Commit c5fc405

Browse files
committed
fix font size
1 parent 627f14d commit c5fc405

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

gui/src/components/mainInput/Lump/sections/tool-policies/ToolPolicyItem.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import {
1010
addTool,
1111
toggleToolSetting,
1212
} from "../../../../../redux/slices/uiSlice";
13-
import { fontSize } from "../../../../../util";
1413
import { ToolTip } from "../../../../gui/Tooltip";
14+
import { useFontSize } from "../../../../ui/font";
1515

1616
interface ToolDropdownItemProps {
1717
tool: Tool;
@@ -42,12 +42,19 @@ function ToolPolicyItem(props: ToolDropdownItemProps) {
4242
return undefined;
4343
}, [props.tool.function.parameters]);
4444

45+
const fontSize = useFontSize(-2);
46+
4547
if (!policy) {
4648
return null;
4749
}
4850

4951
return (
50-
<div className="flex flex-col">
52+
<div
53+
className="flex flex-col"
54+
style={{
55+
fontSize,
56+
}}
57+
>
5158
<div className="flex flex-row items-center">
5259
<div
5360
className={`hover:bg-list-active hover:text-list-active-foreground xs:gap-1.5 flex flex-1 cursor-pointer flex-row items-center gap-1 py-0.5 pl-1 pr-2`}
@@ -60,7 +67,7 @@ function ToolPolicyItem(props: ToolDropdownItemProps) {
6067
<div
6168
className={`flex items-center gap-1 rounded-md`}
6269
style={{
63-
fontSize: fontSize(-3),
70+
fontSize,
6471
}}
6572
>
6673
{props.duplicatesDetected ? (
@@ -94,7 +101,7 @@ function ToolPolicyItem(props: ToolDropdownItemProps) {
94101
className="h-3 w-3 flex-shrink-0"
95102
/>
96103
)}
97-
<span className="line-clamp-1 break-all text-xs">
104+
<span className="line-clamp-1 break-all">
98105
{props.tool.function.name}
99106
</span>
100107
</div>

0 commit comments

Comments
 (0)