-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TODO:2023-03-04-03-59-43 - Re-Write Examples in Typescript Summary: Update `Example01` to render nothing.
- Loading branch information
1 parent
72c0261
commit a7aaa3d
Showing
1 changed file
with
6 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
); | ||
}; |