Skip to content

Commit

Permalink
Move the unitless property note to value prop and reflect the same in…
Browse files Browse the repository at this point in the history
… JSDocs
  • Loading branch information
himanshupathak95 committed Feb 27, 2025
1 parent 44bbf50 commit dbf1a06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/font-size-picker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ 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' ]`

### `value`: `number | 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.

- Required: No

### `withReset`: `boolean`
Expand Down
4 changes: 4 additions & 0 deletions packages/components/src/font-size-picker/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/**
Expand Down

0 comments on commit dbf1a06

Please sign in to comment.