import React from 'react';
import { SafeAreaView, StyleSheet, Text, View } from 'react-native';
import { withInAppMessaging } from '@aws-amplify/ui-react-native';
import { Button, Checkbox, Radio, RadioGroup } from '../../../ui';
import { useInAppDemo, ACTIONS, LAYOUTS, ORIENTATIONS } from './utils';
function DemoDivider() {
return ;
}
function DemoCheckbox({ onChange, ...rest }: any) {
return (
{
onChange((prev: boolean) => !prev);
}}
size={20}
/>
);
}
function DemoRadioGroup({ data, ...rest }: any) {
return (
{data.map((item: string) => (
))}
);
}
function Demo() {
const {
displayDemoMessage,
handleAction,
hasHeader,
hasImage,
hasMessage,
hasPrimaryButton,
hasSecondaryButton,
imageOrientation,
layout,
primaryButtonAction,
secondaryButtonAction,
} = useInAppDemo();
return (
Configure Demo Message
);
}
const styles = StyleSheet.create({
button: {
backgroundColor: '#0f5a68',
borderRadius: 8,
borderWidth: StyleSheet.hairlineWidth,
marginVertical: 8,
padding: 12,
},
buttonLabel: {
color: '#fff',
fontSize: 18,
fontWeight: '700',
},
container: {
flex: 1,
justifyContent: 'center',
paddingHorizontal: 24,
},
divider: {
backgroundColor: 'black',
height: StyleSheet.hairlineWidth,
marginVertical: 4,
width: '100%',
},
heading: {
justifyContent: 'center',
fontSize: 24,
fontWeight: '700',
marginVertical: 8,
},
label: {
fontSize: 18,
},
radioGroupLabel: {
marginBottom: 4,
},
wrapper: {
flex: 1,
},
});
export default withInAppMessaging(Demo);