real settings view impl

server management mostly working
changing active server needs work
This commit is contained in:
austinried
2021-07-30 10:24:42 +09:00
parent d486fb9782
commit c24f5e573d
9 changed files with 404 additions and 76 deletions

View File

@@ -1,18 +1,21 @@
import colors from '@app/styles/colors'
import font from '@app/styles/font'
import React from 'react'
import { GestureResponderEvent, StyleSheet, Text } from 'react-native'
import { GestureResponderEvent, StyleProp, StyleSheet, Text, ViewStyle } from 'react-native'
import PressableOpacity from './PressableOpacity'
const Button: React.FC<{
title?: string
buttonStyle?: 'hollow' | 'highlight'
onPress: (event: GestureResponderEvent) => void
}> = ({ title, buttonStyle, onPress, children }) => {
style?: StyleProp<ViewStyle>
disabled?: boolean
}> = ({ title, buttonStyle, onPress, children, style, disabled }) => {
return (
<PressableOpacity
onPress={onPress}
style={[styles.container, buttonStyle !== undefined ? styles[buttonStyle] : {}]}>
disabled={disabled}
style={[styles.container, buttonStyle !== undefined ? styles[buttonStyle] : {}, style]}>
{title ? <Text style={styles.text}>{title}</Text> : children}
</PressableOpacity>
)
@@ -28,7 +31,7 @@ const styles = StyleSheet.create({
},
hollow: {
backgroundColor: 'transparent',
borderColor: colors.text.secondary,
borderColor: colors.text.primary,
borderWidth: 1.5,
},
highlight: {