HoshiAI-app/components/question.tsx
2026-01-01 17:46:58 +01:00

32 lines
711 B
TypeScript

import { QuestionResponse } from "@/api/types";
import { Pressable, StyleSheet } from "react-native";
import Panel from "./ui/panel";
import { ThemedText } from "./ui/themed-text";
interface QuestionProps {
question: QuestionResponse;
onPress?: () => void;
}
const Question = ({ question, onPress }: QuestionProps) => {
return (
<Pressable onPress={onPress}>
<Panel>
<ThemedText style={styles.questionTitle}>{question.title}</ThemedText>
<ThemedText>{question.description}</ThemedText>
</Panel>
</Pressable>
)
}
const styles = StyleSheet.create({
questionTitle: {
fontSize: 18,
fontWeight: "600",
marginBottom: 10
},
});
export default Question;