File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
modules/navigation-buttons Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ import * as React from 'react'
2+ import { Alert , StyleSheet } from 'react-native'
3+ import Icon from 'react-native-vector-icons/Ionicons'
4+ import { Touchable } from '@frogpond/touchable'
5+ import * as c from '@frogpond/colors'
6+ import { rightButtonStyles as styles } from './styles'
7+
8+ export const debugStyles = StyleSheet . create ( {
9+ debugButton : {
10+ color : c . link ,
11+ } ,
12+ } )
13+
14+ type Props = {
15+ shouldShow : boolean
16+ }
17+
18+ export const DebugNoticeButton = function ( props : Props ) : JSX . Element {
19+ if ( ! props . shouldShow ) {
20+ return < > </ >
21+ }
22+
23+ return (
24+ < Touchable
25+ highlight = { false }
26+ onPress = { ( ) => {
27+ Alert . alert ( 'Debug notice' , 'This view is showing mocked data.' )
28+ } }
29+ style = { styles . button }
30+ >
31+ < Icon name = "bug" style = { [ styles . icon , debugStyles . debugButton ] } />
32+ </ Touchable >
33+ )
34+ }
Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ export {ShareButton} from './share'
22export { CloseScreenButton } from './close-screen'
33export { OpenSettingsButton } from './open-settings'
44export { FavoriteButton } from './favorite'
5+ export { DebugNoticeButton } from './debug'
56export { SearchButton } from './search'
You can’t perform that action at this time.
0 commit comments