Skip to content

Commit 2e6fc4e

Browse files
refactor(ui): use current input group parts in phone input
1 parent 4d16577 commit 2e6fc4e

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

‎packages/ui/src/mosaic/components/phone-input/phone-input.tsx‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { Combobox } from '../combobox';
1919
import { Field } from '../field';
2020
import { useOptionalFieldContext } from '../field/field.context';
2121
import { Icon } from '../icon';
22-
import { Input } from '../input';
2322
import { InputGroup } from '../input-group';
2423
import { Popover } from '../popover';
2524
import { styles } from './phone-input.styles';
@@ -248,13 +247,13 @@ export const PhoneInput = React.forwardRef<HTMLInputElement, PhoneInputProps>(fu
248247
size='md'
249248
{...mergeStyleProps(themeProps('phone-input-country-search'), stylex.props(styles.countrySearch))}
250249
>
251-
<InputGroup.Text>
250+
<InputGroup.Start>
252251
<Icon
253252
name='search'
254253
size='sm'
255254
aria-hidden='true'
256255
/>
257-
</InputGroup.Text>
256+
</InputGroup.Start>
258257
<Combobox.Input
259258
variant='ghost'
260259
aria-label='Search countries'
@@ -296,7 +295,7 @@ export const PhoneInput = React.forwardRef<HTMLInputElement, PhoneInputProps>(fu
296295
</Popover.Popup>
297296
</Popover.Root>
298297

299-
<InputGroup.Text
298+
<InputGroup.Start
300299
aria-hidden='true'
301300
{...mergeStyleProps(themeProps('phone-input-prefix'), stylex.props(styles.prefix))}
302301
>
@@ -305,8 +304,8 @@ export const PhoneInput = React.forwardRef<HTMLInputElement, PhoneInputProps>(fu
305304
{...mergeStyleProps(themeProps('phone-input-divider'), stylex.props(reset.base, styles.divider))}
306305
/>
307306
+{country.code}
308-
</InputGroup.Text>
309-
<Input
307+
</InputGroup.Start>
308+
<InputGroup.Input
310309
ref={setInputRef}
311310
variant='ghost'
312311
{...mergeStyleProps(themeProps('phone-input-control'), stylex.props(styles.control))}

0 commit comments

Comments
 (0)