Application Android et IOS pour l'amicale des élèves
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

EventDashboardItem.js 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // @flow
  2. import * as React from 'react';
  3. import {Avatar, Card, withTheme} from 'react-native-paper';
  4. function EventDashBoardItem(props) {
  5. const {colors} = props.theme;
  6. const iconColor = props.isAvailable ?
  7. colors.planningColor :
  8. colors.textDisabled;
  9. const textColor = props.isAvailable ?
  10. colors.text :
  11. colors.textDisabled;
  12. return (
  13. <Card
  14. style={{
  15. width: 'auto',
  16. marginLeft: 10,
  17. marginRight: 10,
  18. marginTop: 10,
  19. overflow: 'hidden',
  20. }}
  21. onPress={props.clickAction}>
  22. <Card.Title
  23. title={props.title}
  24. titleStyle={{color: textColor}}
  25. subtitle={props.subtitle}
  26. subtitleStyle={{color: textColor}}
  27. left={() =>
  28. <Avatar.Icon
  29. icon={props.icon}
  30. color={iconColor}
  31. size={60}
  32. style={{backgroundColor: 'transparent'}}/>}
  33. />
  34. <Card.Content>
  35. {props.children}
  36. </Card.Content>
  37. </Card>
  38. );
  39. }
  40. export default withTheme(EventDashBoardItem);