1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- // @flow
-
- import * as React from 'react';
- import {Avatar, Card, withTheme} from 'react-native-paper';
-
- function EventDashBoardItem(props) {
- const {colors} = props.theme;
- const iconColor = props.isAvailable ?
- colors.planningColor :
- colors.textDisabled;
- const textColor = props.isAvailable ?
- colors.text :
- colors.textDisabled;
- return (
- <Card
- style={{
- width: 'auto',
- marginLeft: 10,
- marginRight: 10,
- marginTop: 10,
- overflow: 'hidden',
- }}
- onPress={props.clickAction}>
-
- <Card.Title
- title={props.title}
- titleStyle={{color: textColor}}
- subtitle={props.subtitle}
- subtitleStyle={{color: textColor}}
- left={() =>
- <Avatar.Icon
- icon={props.icon}
- color={iconColor}
- size={60}
- style={{backgroundColor: 'transparent'}}/>}
- />
- <Card.Content>
- {props.children}
- </Card.Content>
- </Card>
- );
- }
-
- export default withTheme(EventDashBoardItem);
|