Skip to content

Commit

Permalink
Add empty example (#2564)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
m-bert authored Aug 8, 2023
1 parent 5c7118a commit a69a563
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
6 changes: 6 additions & 0 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -55,6 +57,10 @@ interface ExamplesSection {
}

const EXAMPLES: ExamplesSection[] = [
{
sectionTitle: 'Empty',
data: [{ name: 'Empty Example', component: EmptyExample }],
},
{
sectionTitle: 'Basic examples',
data: [
Expand Down
19 changes: 19 additions & 0 deletions example/src/empty/EmptyExample.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';

export default function EmptyExample() {
return (
<View style={styles.container}>
<Text>Hello World!</Text>
</View>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
});

0 comments on commit a69a563

Please sign in to comment.