mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add ai and todo example templates for native frontends (#293)
This commit is contained in:
@@ -1,31 +1,26 @@
|
||||
import FontAwesome from '@expo/vector-icons/FontAwesome';
|
||||
import { forwardRef } from 'react';
|
||||
import { Pressable, StyleSheet } from 'react-native';
|
||||
import FontAwesome from "@expo/vector-icons/FontAwesome";
|
||||
import { forwardRef } from "react";
|
||||
import { Pressable } from "react-native";
|
||||
|
||||
export const HeaderButton = forwardRef<typeof Pressable, { onPress?: () => void }>(
|
||||
({ onPress }, ref) => {
|
||||
return (
|
||||
<Pressable onPress={onPress}>
|
||||
{({ pressed }) => (
|
||||
<FontAwesome
|
||||
name="info-circle"
|
||||
size={25}
|
||||
color="gray"
|
||||
style={[
|
||||
styles.headerRight,
|
||||
{
|
||||
opacity: pressed ? 0.5 : 1,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
export const styles = StyleSheet.create({
|
||||
headerRight: {
|
||||
marginRight: 15,
|
||||
},
|
||||
export const HeaderButton = forwardRef<
|
||||
typeof Pressable,
|
||||
{ onPress?: () => void }
|
||||
>(({ onPress }, ref) => {
|
||||
return (
|
||||
<Pressable
|
||||
onPress={onPress}
|
||||
className="p-2 mr-2 rounded-lg bg-secondary/50 active:bg-secondary"
|
||||
>
|
||||
{({ pressed }) => (
|
||||
<FontAwesome
|
||||
name="info-circle"
|
||||
size={20}
|
||||
className="text-secondary-foreground"
|
||||
style={{
|
||||
opacity: pressed ? 0.7 : 1,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</Pressable>
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user