Categoris (wip)
This commit is contained in:
30
src/components/CategoryItem.js
Normal file
30
src/components/CategoryItem.js
Normal file
@@ -0,0 +1,30 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user