12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- // @flow
-
- import * as React from 'react';
- import {Avatar, Card, Paragraph} from 'react-native-paper';
- import {StyleSheet} from 'react-native';
- import i18n from 'i18n-js';
- import type {CardTitleIconPropsType} from '../../../constants/PaperStyles';
-
- type PropsType = {
- startDate: string,
- };
-
- const styles = StyleSheet.create({
- card: {
- margin: 10,
- },
- icon: {
- backgroundColor: 'transparent',
- },
- });
-
- export default class VoteTease extends React.Component<PropsType> {
- shouldComponentUpdate(): boolean {
- return false;
- }
-
- render(): React.Node {
- const {props} = this;
- return (
- <Card style={styles.card}>
- <Card.Title
- title={i18n.t('screens.vote.tease.title')}
- subtitle={i18n.t('screens.vote.tease.subtitle')}
- left={(iconProps: CardTitleIconPropsType): React.Node => (
- <Avatar.Icon size={iconProps.size} icon="vote" />
- )}
- />
- <Card.Content>
- <Paragraph>
- {`${i18n.t('screens.vote.tease.message')} ${props.startDate}`}
- </Paragraph>
- </Card.Content>
- </Card>
- );
- }
- }
|