Skip to content

Commit

Permalink
Font Size Picker: Add truncation to header hint and adjust styles
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshbhutkar committed Jan 2, 2025
1 parent 6eb365e commit 0643023
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/components/src/font-size-picker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import FontSizePickerSelect from './font-size-picker-select';
import FontSizePickerToggleGroup from './font-size-picker-toggle-group';
import { T_SHIRT_NAMES } from './constants';
import { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';
import { Truncate } from '../truncate';

const DEFAULT_UNITS = [ 'px', 'em', 'rem', 'vw', 'vh' ];

Expand Down Expand Up @@ -141,7 +142,7 @@ const UnforwardedFontSizePicker = (
{ __( 'Size' ) }
{ headerHint && (
<HeaderHint className="components-font-size-picker__header__hint">
{ headerHint }
<Truncate>{ headerHint }</Truncate>
</HeaderHint>
) }
</HeaderLabel>
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/font-size-picker/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ export const HeaderLabel = styled( BaseControl.VisualLabel )`

export const HeaderHint = styled.span`
color: ${ COLORS.gray[ 700 ] };
display: contents;
`;

0 comments on commit 0643023

Please sign in to comment.