import {Dimensions, Image, StyleSheet, Text, View} from 'react-native'; import {Colors} from 'react-native/Libraries/NewAppScreen'; import {PropsWithChildren, useState} from 'react'; import {Button, Card, Modal} from '@ant-design/react-native'; import { V1Field } from '@formstr/sdk/dist/interfaces'; import { InputFiller } from '../Inputs/Inputs'; import { SendPrescription } from './sendPrescription'; type SectionProps = PropsWithChildren<{ title: string; }>; const backgroundStyle = { backgroundColor: Colors.darker, }; const styles = StyleSheet.create({ sectionContainer: { marginTop: 32, paddingHorizontal: 24, width: Dimensions.get('window').width - 80, }, sectionTitle: { fontSize: 24, fontWeight: '600', }, sectionDescription: { marginTop: 8, fontSize: 18, fontWeight: '400', }, highlight: { fontWeight: '500', }, }); function Section({children, title}: SectionProps): React.JSX.Element { return ( {title} {children} ); } export const PrescriptionCreator = ({form} : {form: any}) => { if(form === null) return Loading... const [showSendScreen, setShowSendScreen] = useState(false); return (
From the practice of {form.name}
{form.fields.map((field: V1Field) => { return ( {field.question} {/* {field.answerType} */} {}} /> ); })}
{ setShowSendScreen(false)}}/>
); };