about summary refs log tree commit diff
path: root/src/components/forms
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2024-02-12 13:36:20 -0800
committerGitHub <noreply@github.com>2024-02-12 13:36:20 -0800
commitba7463cadf15bd5420e1a8cc46952bde2c81cad9 (patch)
treef4ed4cc4f0aa68da006d22bbe7be60ef3d56fe3a /src/components/forms
parentb91a6b429a59066cfdff1da92a379f98dedafccf (diff)
downloadvoidsky-ba7463cadf15bd5420e1a8cc46952bde2c81cad9.tar.zst
Improved server selector during account creation and signin (#2840)
* Replace the ServerInput modal with a new dialog based on alf that remembers your server address history and doesnt put staging and localdev in the options

* Update the server selector during account creation

* dont apply capitalization, use url keyboard

* Apply insets to dialog top

* Improve padding of dialogs on native

* Fix race condition in dialog close; also fix fire of the onClose event in dialogs

---------

Co-authored-by: Hailey <me@haileyok.com>
Diffstat (limited to 'src/components/forms')
-rw-r--r--src/components/forms/TextField.tsx6
-rw-r--r--src/components/forms/ToggleButton.tsx2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/components/forms/TextField.tsx b/src/components/forms/TextField.tsx
index 70f900bb9..99d5e7152 100644
--- a/src/components/forms/TextField.tsx
+++ b/src/components/forms/TextField.tsx
@@ -238,10 +238,14 @@ export function createInput(Component: typeof TextInput) {
 
 export const Input = createInput(TextInput)
 
-export function Label({children}: React.PropsWithChildren<{}>) {
+export function Label({
+  nativeID,
+  children,
+}: React.PropsWithChildren<{nativeID?: string}>) {
   const t = useTheme()
   return (
     <Text
+      nativeID={nativeID}
       style={[a.text_sm, a.font_bold, t.atoms.text_contrast_medium, a.mb_sm]}>
       {children}
     </Text>
diff --git a/src/components/forms/ToggleButton.tsx b/src/components/forms/ToggleButton.tsx
index 90790f9fc..7e1bd70b9 100644
--- a/src/components/forms/ToggleButton.tsx
+++ b/src/components/forms/ToggleButton.tsx
@@ -8,7 +8,7 @@ import * as Toggle from '#/components/forms/Toggle'
 
 export type ItemProps = Omit<Toggle.ItemProps, 'style' | 'role' | 'children'> &
   AccessibilityProps &
-  React.PropsWithChildren<{}>
+  React.PropsWithChildren<{testID?: string}>
 
 export type GroupProps = Omit<Toggle.GroupProps, 'style' | 'type'> & {
   multiple?: boolean