Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix: change font size props value to number; increase font (#6649)

Roman Sergeev66974b0f5714
diff --git a/packages/ui/src/components/font-size/FontSize.tsx b/packages/ui/src/components/font-size/FontSize.tsx
index ccc8450758..a42e304f08 100644
--- a/packages/ui/src/components/font-size/FontSize.tsx
+++ b/packages/ui/src/components/font-size/FontSize.tsx
@@ -37,7 +37,7 @@ export const FontSize = (props: IFontSizeProps) => {
e.stopPropagation();
if (e.code === 'Enter') {
- onChange(realValue.toString());
+ onChange(realValue);
}
}
diff --git a/packages/ui/src/components/font-size/interface.ts b/packages/ui/src/components/font-size/interface.ts
index 5ee7dbf3d1..b3fab943a9 100644
--- a/packages/ui/src/components/font-size/interface.ts
+++ b/packages/ui/src/components/font-size/interface.ts
@@ -18,14 +18,14 @@ import type { Observable } from 'rxjs';
import type { ICustomComponentProps } from '../../services/menu/menu';
import { NamedStyleType } from '@univerjs/core';
-export interface IFontSizeProps extends ICustomComponentProps<string> {
- value: string;
+export interface IFontSizeProps extends ICustomComponentProps<number> {
+ value: number;
min: number;
max: number;
- onChange: (value: string) => void;
+ onChange: (value: number) => void;
disabled$?: Observable<boolean>;
}