import * as React from "react"; import { View, StyleSheet, Text, TouchableOpacity } from "react-native"; import { Plan } from "../../types/plan"; interface Props { plans: Plan[]; onPlanPressed: (plan: Plan) => () => void; } const COLORS = ["orange", "green", "blue"]; interface State {} export default class PlanComponent extends React.PureComponent { constructor(props: Props) { super(props); this.state = {}; } public render(): React.ReactNode { return ( {this.props.plans.map((plan, index) => { return ( {plan.name} {plan.description} ); })} ); } } const styles = StyleSheet.create({ recommendWrapper: { position: "absolute", top: -10, backgroundColor: "rgb(255, 148, 27)", paddingHorizontal: 13, height: 20, justifyContent: "center", alignItems: "center", borderRadius: 10, }, container: { justifyContent: "center", alignItems: "center", borderRadius: 8, marginHorizontal: 8, paddingVertical: 5, marginBottom: 5, }, planWrapper: { marginTop: 15, marginHorizontal: 20, }, titleStyle: { fontSize: 18, marginBottom: 8, fontWeight: "600", textTransform: "uppercase", }, wrapper: { width: "100%", }, });