about summary refs log tree commit diff
path: root/src/view/screens/Storybook/Toasts.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/screens/Storybook/Toasts.tsx')
-rw-r--r--src/view/screens/Storybook/Toasts.tsx18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/view/screens/Storybook/Toasts.tsx b/src/view/screens/Storybook/Toasts.tsx
index 5197ec2f4..4c17f1c33 100644
--- a/src/view/screens/Storybook/Toasts.tsx
+++ b/src/view/screens/Storybook/Toasts.tsx
@@ -1,22 +1,24 @@
-import {View, Pressable} from 'react-native'
+import {Pressable, View} from 'react-native'
 
-import {atoms as a, useTheme} from '#/alf'
-import {Text, H1} from '#/components/Typography'
+import * as Toast from '#/view/com/util/Toast'
 import {
-  type ToastType,
-  TOAST_TYPE_TO_ICON,
   getToastTypeStyles,
+  TOAST_TYPE_TO_ICON,
+  type ToastType,
 } from '#/view/com/util/Toast.style'
-import * as Toast from '#/view/com/util/Toast'
+import {atoms as a, useTheme} from '#/alf'
+import {H1, Text} from '#/components/Typography'
 
 function ToastPreview({message, type}: {message: string; type: ToastType}) {
   const t = useTheme()
   const toastStyles = getToastTypeStyles(t)
-  const colors = toastStyles[type]
-  const IconComponent = TOAST_TYPE_TO_ICON[type]
+  const colors = toastStyles[type as keyof typeof toastStyles]
+  const IconComponent =
+    TOAST_TYPE_TO_ICON[type as keyof typeof TOAST_TYPE_TO_ICON]
 
   return (
     <Pressable
+      accessibilityRole="button"
       onPress={() => Toast.show(message, type)}
       style={[
         {backgroundColor: colors.backgroundColor},