Skip to content

Commit 6ebba52

Browse files
committed
feat: add font size property to horizontal menu
1 parent 38cf5c8 commit 6ebba52

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/common/components/mock-components/front-rich-components/horizontal-menu/horizontal-menu.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const HorizontalMenu = forwardRef<any, ShapeProps>((props, ref) => {
4242
const csvData = splitCSVContentIntoRows(text);
4343
const headers = extractCSVHeaders(csvData[0]);
4444
const itemLabels = headers.map(header => header.text);
45-
45+
const verticalPadding = 8;
4646
const numberOfItems = itemLabels.length;
4747
const itemSpacing = 10;
4848

@@ -96,12 +96,12 @@ export const HorizontalMenu = forwardRef<any, ShapeProps>((props, ref) => {
9696
x={itemSpacing * (index + 1) + itemWidth * index}
9797
y={itemVerticalPadding}
9898
width={itemWidth}
99-
height={restrictedHeight - 2 * itemVerticalPadding}
99+
height={restrictedHeight - verticalPadding}
100100
fill={index === activeSelected ? 'lightblue' : fill}
101101
/>
102102
<Text
103103
x={itemSpacing * (index + 1) + itemWidth * index}
104-
y={restrictedHeight / 2 - 8}
104+
y={restrictedHeight / 2 - fontSize / 2}
105105
text={header}
106106
fontFamily="Arial"
107107
fontSize={fontSize}

0 commit comments

Comments
 (0)