mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
real settings view impl
server management mostly working changing active server needs work
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user