Skip to content

Commit

Permalink
🛠 Refactor: Ex - Update Example01
Browse files Browse the repository at this point in the history
TODO:2023-03-04-03-59-43 - Re-Write Examples in Typescript

Summary: Update `Example01` to render nothing.
  • Loading branch information
dominicstop committed Mar 3, 2023
1 parent 72c0261 commit a7aaa3d
Showing 1 changed file with 6 additions and 32 deletions.
38 changes: 6 additions & 32 deletions example/src/examples/Example01.tsx
Original file line number Diff line number Diff line change
@@ -1,49 +1,23 @@
import * as React from 'react';
import { Alert } from 'react-native';

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

import { ExampleButtonCard } from '../components/ExampleButtonCard';
import { ContextMenuCardButton } from '../components/ContextMenuCardButton';


export function Example01(props: ContextMenuExampleProps) {
export function Example01(props: ExampleProps) {
return (
<ExampleButtonCard
style={props.style}
index={props.index}
title={'ContextMenuButtonExample01'}
subtitle={'actions text-only'}
title={'Example01'}
subtitle={'TBA'}
description={[
`Context menu button with 3 actions (no icon, just text).`,
`Long press on the button to show the context menu.`
`TBA`,
`TBA`
]}
>
<ContextMenuButton
menuConfig={{
menuTitle: 'ContextMenuButtonSimpleExample01',
menuItems: [{
actionKey : 'key-01',
actionTitle: 'Action #1',
}, {
actionKey : 'key-02' ,
actionTitle: 'Action #2',
}, {
actionKey : 'key-03' ,
actionTitle: 'Action #3',
}],
}}
onPressMenuItem={({nativeEvent}) => {
Alert.alert(
'onPressMenuItem Event',
`actionKey: ${nativeEvent.actionKey} - actionTitle: ${nativeEvent.actionTitle}`
);
}}
>
<ContextMenuCardButton
buttonTitle={'⭐️ Context Menu Button'}
/>
</ContextMenuButton>
{/** TBA */}
</ExampleButtonCard>
);
};

0 comments on commit a7aaa3d

Please sign in to comment.