@@ -16,9 +16,9 @@ import { isRTL, __ } from '@wordpress/i18n';
1616import { Flex , FlexBlock } from '../flex' ;
1717import { Spacer } from '../spacer' ;
1818import NumberControl from '../number-control' ;
19- import { Text } from '../text' ;
19+ import InputControlPrefixWrapper from '../input-control/input-prefix-wrapper' ;
20+ import InputControlSuffixWrapper from '../input-control/input-suffix-wrapper' ;
2021import AngleCircle from './angle-circle' ;
21- import styles from './style.module.scss' ;
2222
2323import type { WordPressComponentProps } from '../context' ;
2424import type { AnglePickerControlProps } from './types' ;
@@ -49,10 +49,9 @@ function UnforwardedAnglePickerControl(
4949
5050 const classes = clsx ( 'components-angle-picker-control' , className ) ;
5151
52- const unitText = < Text className = { styles [ 'unit-text' ] } > °</ Text > ;
53- const [ prefixedUnitText , suffixedUnitText ] = isRTL ( )
54- ? [ unitText , null ]
55- : [ null , unitText ] ;
52+ const prefixOrSuffixProp = isRTL ( )
53+ ? { prefix : < InputControlPrefixWrapper > °</ InputControlPrefixWrapper > }
54+ : { suffix : < InputControlSuffixWrapper > °</ InputControlSuffixWrapper > } ;
5655
5756 return (
5857 < Flex { ...restProps } ref = { ref } className = { classes } gap = { 2 } >
@@ -67,8 +66,7 @@ function UnforwardedAnglePickerControl(
6766 step = "1"
6867 value = { value }
6968 spinControls = "none"
70- prefix = { prefixedUnitText }
71- suffix = { suffixedUnitText }
69+ { ...prefixOrSuffixProp }
7270 />
7371 </ FlexBlock >
7472 < Spacer marginBottom = "1" marginTop = "auto" >
0 commit comments