import React from 'react';
import { Button, StyleSheet, Text, View } from 'react-native';
import { Amplify } from 'aws-amplify';
import {
Authenticator,
useAuthenticator,
useTheme,
} from '@aws-amplify/ui-react-native';
import awsconfig from './aws-exports';
Amplify.configure(awsconfig);
const MyAppHeader = () => {
const {
tokens: { space, fontSizes },
} = useTheme();
return (
My Header
);
};
function SignOutButton() {
const { signOut } = useAuthenticator();
return ;
}
function App() {
const {
tokens: { colors },
} = useTheme();
return (
(
// reuse default `Container` and apply custom background
)}
// will render on every subcomponent
Header={MyAppHeader}
>
);
}
const style = StyleSheet.create({
container: { flex: 1, alignItems: 'center', justifyContent: 'center' },
});
export default App;