Files
old-meme/src/components/CategoryItem.js
2017-09-23 11:31:22 +02:00

31 lines
622 B
JavaScript

import React from 'react';
import { Text, View } from 'react-native';
const CategoryItem = (props) => {
const { categoryTextStyle } = styles;
return (
<View style={containerStyle(props.categoryBackgroudColor)}>
<Text style={categoryTextStyle}>
{props.categoryName}
</Text>
</View>
);
};
const containerStyle = function (containerBackgroudColor) {
return {
backgroundColor: containerBackgroudColor,
justifyContent: 'center',
alignItems: 'center'
};
};
const styles = {
categoryTextStyle: {
fontSize: 20,
color: '#fff'
}
};
export default CategoryItem;