From a69a563c3025a368a95ae81a9283ec7863803fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bert?= <63123542+m-bert@users.noreply.github.com> Date: Tue, 8 Aug 2023 10:57:22 +0200 Subject: [PATCH] Add empty example (#2564) ## Description This PR adds empty example to our example app. It can be helpful when it comes to testing reproductions from issues or just some new features/ideas. You can find similar idea in `react-native-reanimated` and it is very useful. ## Test plan Tested (?) on example app --- example/src/App.tsx | 6 ++++++ example/src/empty/EmptyExample.tsx | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 example/src/empty/EmptyExample.tsx diff --git a/example/src/App.tsx b/example/src/App.tsx index 74bf6a2218..aa2c669d1b 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -45,6 +45,8 @@ import BetterHorizontalDrawer from './new_api/betterHorizontalDrawer'; import ManualGestures from './new_api/manualGestures'; import VelocityTest from './new_api/velocityTest'; +import EmptyExample from './empty/EmptyExample'; + interface Example { name: string; component: React.ComponentType; @@ -55,6 +57,10 @@ interface ExamplesSection { } const EXAMPLES: ExamplesSection[] = [ + { + sectionTitle: 'Empty', + data: [{ name: 'Empty Example', component: EmptyExample }], + }, { sectionTitle: 'Basic examples', data: [ diff --git a/example/src/empty/EmptyExample.tsx b/example/src/empty/EmptyExample.tsx new file mode 100644 index 0000000000..28aa248fab --- /dev/null +++ b/example/src/empty/EmptyExample.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import { StyleSheet, Text, View } from 'react-native'; + +export default function EmptyExample() { + return ( + + Hello World! + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + backgroundColor: '#F5FCFF', + }, +});