mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
29 lines
492 B
TypeScript
29 lines
492 B
TypeScript
import * as React from 'react';
|
|
import { StyleSheet, View, Text } from 'react-native';
|
|
|
|
type Props = {
|
|
user: string;
|
|
};
|
|
|
|
export function Home({ user }: Props) {
|
|
return (
|
|
<View style={styles.container}>
|
|
<Text role="heading" style={styles.title}>
|
|
Welcome {user}!
|
|
</Text>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
padding: 20,
|
|
},
|
|
title: {
|
|
alignSelf: 'center',
|
|
fontSize: 24,
|
|
marginTop: 8,
|
|
marginBottom: 40,
|
|
},
|
|
});
|