Skip to content

Commit d3641f8

Browse files
committed
revert changes to debug notice button
1 parent 3f27478 commit d3641f8

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
}

modules/navigation-buttons/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ export {ShareButton} from './share'
22
export {CloseScreenButton} from './close-screen'
33
export {OpenSettingsButton} from './open-settings'
44
export {FavoriteButton} from './favorite'
5+
export {DebugNoticeButton} from './debug'
56
export {SearchButton} from './search'

0 commit comments

Comments
 (0)