@@ -10,6 +10,7 @@ import {
1010 splitCSVContentIntoRows ,
1111} from '@/common/utils/active-element-selector.utils' ;
1212import { useGroupShapeProps } from '../../mock-components.utils' ;
13+ import { useResizeOnFontSizeChange } from '../../front-text-components/front-text-hooks/resize-fontsize-change.hook' ;
1314
1415const horizontalMenuShapeSizeRestrictions : ShapeSizeRestrictions = {
1516 minWidth : 200 ,
@@ -54,8 +55,15 @@ export const HorizontalMenu = forwardRef<any, ShapeProps>((props, ref) => {
5455 const totalMargins = restrictedWidth - itemSpacing * ( numberOfItems + 1 ) ;
5556 const itemWidth = totalMargins / numberOfItems ;
5657
57- const { stroke, strokeStyle, fill, textColor, borderRadius, fontSize } =
58- useShapeProps ( otherProps , BASIC_SHAPE ) ;
58+ const {
59+ stroke,
60+ strokeStyle,
61+ fill,
62+ textColor,
63+ borderRadius,
64+ fontSize,
65+ fontVariant,
66+ } = useShapeProps ( otherProps , BASIC_SHAPE ) ;
5967
6068 const itemVerticalPadding = 4 ;
6169
@@ -67,7 +75,7 @@ export const HorizontalMenu = forwardRef<any, ShapeProps>((props, ref) => {
6775 shapeType ,
6876 ref
6977 ) ;
70-
78+ useResizeOnFontSizeChange ( id , { x , y } , text , fontSize , fontVariant ) ;
7179 return (
7280 < Group { ...commonGroupProps } { ...shapeProps } >
7381 < Rect
@@ -102,6 +110,7 @@ export const HorizontalMenu = forwardRef<any, ShapeProps>((props, ref) => {
102110 align = "center"
103111 wrap = "none"
104112 ellipsis = { true }
113+ fontVariant = { fontVariant }
105114 />
106115 </ Group >
107116 ) ) }
0 commit comments