Skip to content

Commit

Permalink
Refactor Tooltip component usage in BoxInputControls for improved rea…
Browse files Browse the repository at this point in the history
…dability
  • Loading branch information
yogeshbhutkar committed Jan 10, 2025
1 parent 3a0fb96 commit 5817076
Showing 1 changed file with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,22 @@ export default function BoxInputControls( {
: selectedUnits[ corner ] || selectedUnits.flat;

return (
<Tooltip text={ label } placement="top" key={ corner }>
<div className="components-border-radius-control__tooltip-wrapper">
<UnitControl
{ ...props }
aria-label={ label }
value={ [ parsedQuantity, computedUnit ].join(
''
) }
onChange={ createHandleOnChange( corner ) }
onUnitChange={ createHandleOnUnitChange(
corner
) }
size="__unstable-large"
/>
</div>
<Tooltip
text={ label }
placement="top"
key={ corner }
className="components-border-radius-control__tooltip-wrapper"
>
<UnitControl
{ ...props }
aria-label={ label }
value={ [ parsedQuantity, computedUnit ].join(
''
) }
onChange={ createHandleOnChange( corner ) }
onUnitChange={ createHandleOnUnitChange( corner ) }
size="__unstable-large"
/>
</Tooltip>
);
} ) }
Expand Down

0 comments on commit 5817076

Please sign in to comment.