From c664a90d765ae47729584e8892b0cf3079635aa3 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 1 Dec 2025 19:27:59 +0200 Subject: [PATCH] add component to storybook --- src/view/screens/Storybook/Forms.tsx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/view/screens/Storybook/Forms.tsx b/src/view/screens/Storybook/Forms.tsx index a29aa70ab7..bef19e6c1e 100644 --- a/src/view/screens/Storybook/Forms.tsx +++ b/src/view/screens/Storybook/Forms.tsx @@ -1,6 +1,8 @@ import React from 'react' import {type TextInput, View} from 'react-native' +import {getDefaultCountry} from '#/lib/international-telephone-codes' +import {useGeolocationStatus} from '#/state/geolocation' import {atoms as a} from '#/alf' import {Button, ButtonText} from '#/components/Button' import {DateField, LabelText} from '#/components/forms/DateField' @@ -9,6 +11,7 @@ import * as TextField from '#/components/forms/TextField' import * as Toggle from '#/components/forms/Toggle' import * as ToggleButton from '#/components/forms/ToggleButton' import {Globe_Stroke2_Corner0_Rounded as Globe} from '#/components/icons/Globe' +import {InternationalPhoneCodeSelect} from '#/components/InternationalPhoneCodeSelect' import {H1, H3} from '#/components/Typography' export function Forms() { @@ -23,6 +26,11 @@ export function Forms() { const [value, setValue] = React.useState('') const [date, setDate] = React.useState('2001-01-01') + const {location} = useGeolocationStatus() + const [telCode, setTelCode] = React.useState(() => + getDefaultCountry(location), + ) + const inputRef = React.useRef(null) return ( @@ -119,6 +127,20 @@ export function Forms() { label="Input" /> + +

InternationalPhoneCodeSelect

+ + + + + + + + +