about summary refs log tree commit diff
path: root/src/view/com/util/forms/Button.tsx
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-11-13 15:53:57 -0600
committerGitHub <noreply@github.com>2023-11-13 13:53:57 -0800
commit06eb8b9a4caf3b4163451c538fa327a880c3a2d2 (patch)
tree07d7f2a068920640b4c536b7020146556086dbec /src/view/com/util/forms/Button.tsx
parenta01463788d5e38ffca81fd0d50886838b7a3baba (diff)
downloadvoidsky-06eb8b9a4caf3b4163451c538fa327a880c3a2d2.tar.zst
Factor our feed source model (#1887)
* Refactor first onboarding step

* Replace old FeedSourceCard

* Clean up CustomFeedEmbed

* Remove discover feeds model

* Refactor ProfileFeed screen

* Remove useCustomFeed

* Delete some unused models

* Rip out more prefs

* Factor out treeView from thread comp

* Improve last commit
Diffstat (limited to 'src/view/com/util/forms/Button.tsx')
-rw-r--r--src/view/com/util/forms/Button.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/view/com/util/forms/Button.tsx b/src/view/com/util/forms/Button.tsx
index 270d98317..8f24f8288 100644
--- a/src/view/com/util/forms/Button.tsx
+++ b/src/view/com/util/forms/Button.tsx
@@ -52,6 +52,7 @@ export function Button({
   accessibilityLabelledBy,
   onAccessibilityEscape,
   withLoading = false,
+  disabled = false,
 }: React.PropsWithChildren<{
   type?: ButtonType
   label?: string
@@ -65,6 +66,7 @@ export function Button({
   accessibilityLabelledBy?: string
   onAccessibilityEscape?: () => void
   withLoading?: boolean
+  disabled?: boolean
 }>) {
   const theme = useTheme()
   const typeOuterStyle = choose<ViewStyle, Record<ButtonType, ViewStyle>>(
@@ -198,7 +200,7 @@ export function Button({
     <Pressable
       style={getStyle}
       onPress={onPressWrapped}
-      disabled={isLoading}
+      disabled={disabled || isLoading}
       testID={testID}
       accessibilityRole="button"
       accessibilityLabel={accessibilityLabel}