Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions FabricExample/src/constants/screenNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export enum ScreenNames {
NATIVE_STACK = "NATIVE_STACK",
NATIVE = "NATIVE",
KEYBOARD_AVOIDING_VIEW = "KEYBOARD_AVOIDING_VIEW",
KEYBOARD_AVOIDING_VIEW_AUTOMATIC = "KEYBOARD_AVOIDING_VIEW_AUTOMATIC",
ENABLED_DISABLED = "ENABLED_DISABLED",
CLOSE = "CLOSE",
FOCUSED_INPUT_HANDLERS = "FOCUSED_INPUT_HANDLERS",
Expand Down
102 changes: 9 additions & 93 deletions FabricExample/src/navigation/ExamplesStack/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import InteractiveKeyboard from "../../screens/Examples/InteractiveKeyboard";
import InteractiveKeyboardIOS from "../../screens/Examples/InteractiveKeyboardIOS";
import KeyboardAnimation from "../../screens/Examples/KeyboardAnimation";
import KeyboardAvoidingViewExample from "../../screens/Examples/KeyboardAvoidingView";
import KeyboardAvoidingViewAutomaticExample from "../../screens/Examples/KeyboardAvoidingViewAutomatic";
import KeyboardChatScrollViewPlayground from "../../screens/Examples/KeyboardChatScrollView";
import KeyboardExtender from "../../screens/Examples/KeyboardExtender";
import KeyboardSharedTransitionExample from "../../screens/Examples/KeyboardSharedTransitions";
Expand All @@ -30,6 +31,8 @@ import ToolbarExample from "../../screens/Examples/Toolbar";
import BottomTabBar from "../BottomTabBar";
import NativeStack from "../NestedStack";

import { options } from "./options";

export type ExamplesStackParamList = {
[ScreenNames.ANIMATED_EXAMPLE]: undefined;
[ScreenNames.REANIMATED_CHAT]: undefined;
Expand All @@ -44,6 +47,7 @@ export type ExamplesStackParamList = {
[ScreenNames.INTERACTIVE_KEYBOARD_IOS]: undefined;
[ScreenNames.NATIVE_STACK]: undefined;
[ScreenNames.KEYBOARD_AVOIDING_VIEW]: undefined;
[ScreenNames.KEYBOARD_AVOIDING_VIEW_AUTOMATIC]: undefined;
[ScreenNames.ENABLED_DISABLED]: undefined;
[ScreenNames.CLOSE]: undefined;
[ScreenNames.FOCUSED_INPUT_HANDLERS]: undefined;
Expand All @@ -62,99 +66,6 @@ export type ExamplesStackParamList = {

const Stack = createStackNavigator<ExamplesStackParamList>();

const options = {
[ScreenNames.ANIMATED_EXAMPLE]: {
title: "Keyboard animation ⌨️",
},
[ScreenNames.REANIMATED_CHAT]: {
title: "Chat",
},
[ScreenNames.REANIMATED_CHAT_FLAT_LIST]: {
title: "Chat FlatList",
},
[ScreenNames.EVENTS]: {
title: "Events",
},
[ScreenNames.AWARE_SCROLL_VIEW]: {
title: "Aware scroll view",
},
[ScreenNames.AWARE_SCROLL_VIEW_STICKY_FOOTER]: {
title: "Aware scroll view sticky footer",
},
[ScreenNames.STATUS_BAR]: {
headerShown: false,
title: "Status bar manipulation",
},
[ScreenNames.LOTTIE]: {
title: "Lottie animation",
},
[ScreenNames.NON_UI_PROPS]: {
title: "Non UI Props",
},
[ScreenNames.INTERACTIVE_KEYBOARD]: {
title: "Interactive keyboard",
},
[ScreenNames.INTERACTIVE_KEYBOARD_IOS]: {
title: "Interactive keyboard 🍏",
},
[ScreenNames.NATIVE_STACK]: {
title: "Native stack",
},
[ScreenNames.KEYBOARD_AVOIDING_VIEW]: {
title: "KAV",
},
[ScreenNames.ENABLED_DISABLED]: {
title: "Enabled/disabled",
},
[ScreenNames.CLOSE]: {
title: "Close keyboard",
},
[ScreenNames.FOCUSED_INPUT_HANDLERS]: {
title: "Focused input handlers",
},
[ScreenNames.TOOLBAR]: {
title: "Toolbar",
},
[ScreenNames.MODAL]: {
title: "Modal",
},
[ScreenNames.BOTTOM_TAB_BAR]: {
headerShown: false,
},
[ScreenNames.OVER_KEYBOARD_VIEW]: {
title: "View over keyboard",
},
[ScreenNames.IMAGE_GALLERY]: {
title: "Image gallery",
},
[ScreenNames.USE_KEYBOARD_STATE]: {
title: "useKeyboardState",
},
[ScreenNames.LIQUID_KEYBOARD]: {
title: "Liquid keyboard",
headerShown: false,
},
[ScreenNames.KEYBOARD_SHARED_TRANSITIONS]: {
title: "Keyboard shared transitions",
headerShown: false,
},
[ScreenNames.KEYBOARD_EXTENDER]: {
title: "Keyboard Extender",
headerShown: false,
},
[ScreenNames.CHAT_KIT]: {
title: "Chat Kit",
headerTintColor: "#fff",
headerStyle: {
backgroundColor: "#3A3A3C",
},
headerBackTitle: "Back",
},
[ScreenNames.AI_LEGEND_LIST_CHAT]: {
title: "AI LegendList Chat",
},
};

const ExamplesStack = () => (
<Stack.Navigator>
<Stack.Screen
Expand Down Expand Up @@ -222,6 +133,11 @@ const ExamplesStack = () => (
name={ScreenNames.KEYBOARD_AVOIDING_VIEW}
options={options[ScreenNames.KEYBOARD_AVOIDING_VIEW]}
/>
<Stack.Screen
component={KeyboardAvoidingViewAutomaticExample}
name={ScreenNames.KEYBOARD_AVOIDING_VIEW_AUTOMATIC}
options={options[ScreenNames.KEYBOARD_AVOIDING_VIEW_AUTOMATIC]}
/>
<Stack.Screen
component={EnabledDisabled}
name={ScreenNames.ENABLED_DISABLED}
Expand Down
97 changes: 97 additions & 0 deletions FabricExample/src/navigation/ExamplesStack/options.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import { ScreenNames } from "../../constants/screenNames";

export const options = {
[ScreenNames.ANIMATED_EXAMPLE]: {
title: "Keyboard animation ⌨️",
},
[ScreenNames.REANIMATED_CHAT]: {
title: "Chat",
},
[ScreenNames.REANIMATED_CHAT_FLAT_LIST]: {
title: "Chat FlatList",
},
[ScreenNames.EVENTS]: {
title: "Events",
},
[ScreenNames.AWARE_SCROLL_VIEW]: {
title: "Aware scroll view",
},
[ScreenNames.AWARE_SCROLL_VIEW_STICKY_FOOTER]: {
title: "Aware scroll view sticky footer",
},
[ScreenNames.STATUS_BAR]: {
headerShown: false,
title: "Status bar manipulation",
},
[ScreenNames.LOTTIE]: {
title: "Lottie animation",
},
[ScreenNames.NON_UI_PROPS]: {
title: "Non UI Props",
},
[ScreenNames.INTERACTIVE_KEYBOARD]: {
title: "Interactive keyboard",
},
[ScreenNames.INTERACTIVE_KEYBOARD_IOS]: {
title: "Interactive keyboard 🍏",
},
[ScreenNames.NATIVE_STACK]: {
title: "Native stack",
},
[ScreenNames.KEYBOARD_AVOIDING_VIEW]: {
title: "KAV",
},
[ScreenNames.KEYBOARD_AVOIDING_VIEW_AUTOMATIC]: {
title: "KAV Automatic",
},
[ScreenNames.ENABLED_DISABLED]: {
title: "Enabled/disabled",
},
[ScreenNames.CLOSE]: {
title: "Close keyboard",
},
[ScreenNames.FOCUSED_INPUT_HANDLERS]: {
title: "Focused input handlers",
},
[ScreenNames.TOOLBAR]: {
title: "Toolbar",
},
[ScreenNames.MODAL]: {
title: "Modal",
},
[ScreenNames.BOTTOM_TAB_BAR]: {
headerShown: false,
},
[ScreenNames.OVER_KEYBOARD_VIEW]: {
title: "View over keyboard",
},
[ScreenNames.IMAGE_GALLERY]: {
title: "Image gallery",
},
[ScreenNames.USE_KEYBOARD_STATE]: {
title: "useKeyboardState",
},
[ScreenNames.LIQUID_KEYBOARD]: {
title: "Liquid keyboard",
headerShown: false,
},
[ScreenNames.KEYBOARD_SHARED_TRANSITIONS]: {
title: "Keyboard shared transitions",
headerShown: false,
},
[ScreenNames.KEYBOARD_EXTENDER]: {
title: "Keyboard Extender",
headerShown: false,
},
[ScreenNames.CHAT_KIT]: {
title: "Chat Kit",
headerTintColor: "#fff",
headerStyle: {
backgroundColor: "#3A3A3C",
},
headerBackTitle: "Back",
},
[ScreenNames.AI_LEGEND_LIST_CHAT]: {
title: "AI LegendList Chat",
},
};
Loading
Loading