Skip to content

Commit

Permalink
⭐️ Impl: Ex - Add Test03 Placeholder
Browse files Browse the repository at this point in the history
TODO:2023-03-04-03-59-43 - Re-Write Examples in Typescript
  • Loading branch information
dominicstop committed Mar 3, 2023
1 parent e5f432e commit ad52ef6
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
62 changes: 62 additions & 0 deletions example/src/examples/Test03.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import * as React from 'react';
import { StyleSheet } from 'react-native';

import type { ExampleProps } from './SharedExampleTypes';

import { ExampleCard } from '../components/ExampleCard';

import { CardBody, CardButton, CardTitle } from '../components/Card';

import { ModalView } from 'react-native-ios-modal';

export function Test03(props: ExampleProps) {
const modalRef = React.useRef<ModalView>(null);

const [counter, setCounter] = React.useState(0);

return (
<ExampleCard
style={props.style}
index={props.index}
title={'Test03'}
subtitle={'test - TBA'}
description={['desc - TBA']}
>
<ModalView
// TBA
ref={modalRef}
containerStyle={styles.modalContainer}
>
<React.Fragment>
<CardBody style={styles.modalCard}>
<CardTitle title={'Title - TBA'} />
</CardBody>
<CardButton
title={'🌼 TBA'}
onPress={() => {
// TBA
}}
/>
</React.Fragment>
</ModalView>
<CardButton
title={'Show Modal'}
onPress={() => {
modalRef.current.setVisibility(true);
}}
/>
</ExampleCard>
);
}

export const styles = StyleSheet.create({
modalContainer: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
modalCard: {
alignSelf: 'stretch',
backgroundColor: 'white',
},
});
2 changes: 2 additions & 0 deletions example/src/screens/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import type { ExampleProps } from '../examples/SharedExampleTypes';
import { Test00 } from '../examples/Test00';
import { Test01 } from '../examples/Test01';
import { Test02 } from '../examples/Test02';
import { Test03 } from '../examples/Test03';

import { Example01 } from '../examples/Example01';

Expand All @@ -37,6 +38,7 @@ const EXAMPLE_COMPONENTS: Array<ExampleComponentItem> = [
Test00,
Test01,
Test02,
Test03,
Example01,
SHARED_ENV.enableReactNavigation && DebugControls,
];
Expand Down

0 comments on commit ad52ef6

Please sign in to comment.