From dbf1a0620de91e96d3d62c94c4863bf4e56204c6 Mon Sep 17 00:00:00 2001 From: himanshupathak95 Date: Thu, 27 Feb 2025 10:24:55 +0530 Subject: [PATCH] Move the unitless property note to value prop and reflect the same in JSDocs --- packages/components/src/font-size-picker/README.md | 4 ++-- packages/components/src/font-size-picker/types.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/components/src/font-size-picker/README.md b/packages/components/src/font-size-picker/README.md index 4e2c441d7139ba..8c5cd1444aa69c 100644 --- a/packages/components/src/font-size-picker/README.md +++ b/packages/components/src/font-size-picker/README.md @@ -92,8 +92,6 @@ Size of the control. Available units for custom font size selection. -**Note**: For the `units` property to work, the current font size value must be specified as strings with units (e.g., `'12px'` instead of `12`). When the font size is provided as a number, the component operates in "unitless mode" where the `units` property has no effect. - - Required: No - Default: `[ 'px', 'em', 'rem', 'vw', 'vh' ]` @@ -101,6 +99,8 @@ Available units for custom font size selection. The current font size value. +**Note**: For the `units` property to work, the current font size value must be specified as strings with units (e.g., `'12px'` instead of `12`). When the font size is provided as a number, the component operates in "unitless mode" where the `units` property has no effect. + - Required: No ### `withReset`: `boolean` diff --git a/packages/components/src/font-size-picker/types.ts b/packages/components/src/font-size-picker/types.ts index 2296e968567882..04964e05d45d55 100644 --- a/packages/components/src/font-size-picker/types.ts +++ b/packages/components/src/font-size-picker/types.ts @@ -34,6 +34,10 @@ export type FontSizePickerProps = { units?: string[]; /** * The current font size value. + * + * Note: For the `units` property to work, the current font size value must be specified + * as strings with units (e.g., '12px' instead of 12). When the font size is provided + * as a number, the component operates in "unitless mode" where the `units` property has no effect. */ value?: number | string; /**