Skip to content

Commit 27b9d86

Browse files
author
Rizwan Zaheer
committed
adding view box on header text & style
1 parent f1a824d commit 27b9d86

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/components/header.js

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
import React, { Component } from 'react';
2-
import { Text } from "react-native";
1+
import React from 'react';
2+
import { Text, View } from "react-native";
33

44
const Header = () => {
5-
const { textStyle } = styles;
6-
return <Text style={textStyle}> Albums </Text>;
5+
const { textStyle, viewStyle } = styles;
6+
return (
7+
<View style={viewStyle}>
8+
<Text style={textStyle}> Albums </Text>
9+
</View>
10+
);
711
};
812
export default Header;
913

1014
const styles = {
15+
viewStyle: {
16+
backgroundColor: '#F8F8F8',
17+
},
1118
textStyle: {
1219
fontSize: 20,
1320
color: 'red'

0 commit comments

Comments
 (0)