Polished up some UI and added dark/light mode
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { supabase } from '@/libs/supabase'
|
||||
import { router } from 'expo-router'
|
||||
import React from 'react'
|
||||
import { Button } from 'react-native'
|
||||
import { Pressable, StyleSheet, Text } from 'react-native'
|
||||
import { useAppTheme } from '@/src/theme/AppThemeProvider'
|
||||
|
||||
async function onSignOutButtonPress() {
|
||||
const { error } = await supabase.auth.signOut()
|
||||
@@ -15,5 +16,27 @@ async function onSignOutButtonPress() {
|
||||
}
|
||||
|
||||
export default function SignOutButton() {
|
||||
return <Button title="Sign out" onPress={onSignOutButtonPress} />
|
||||
const { palette } = useAppTheme()
|
||||
|
||||
return (
|
||||
<Pressable
|
||||
onPress={onSignOutButtonPress}
|
||||
style={[styles.button, { borderColor: palette.border, backgroundColor: palette.elevated }]}
|
||||
>
|
||||
<Text style={[styles.text, { color: palette.text }]}>Sign out</Text>
|
||||
</Pressable>
|
||||
)
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
button: {
|
||||
borderWidth: 1,
|
||||
borderRadius: 999,
|
||||
paddingHorizontal: 14,
|
||||
paddingVertical: 8,
|
||||
},
|
||||
text: {
|
||||
fontSize: 14,
|
||||
fontWeight: '600',
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user