Как я могу сделать график реакции на родную? - PullRequest
0 голосов
/ 06 апреля 2020

как мне сделать одну временную шкалу, я использую библиотеку под названием flatlist, мне нужно, чтобы информация отображалась в виде буквы с изображением и комментария, подобного этому, в дизайне (компонент: https://www.npmjs.com/package/react-native-timeline-flatlist) код:

/*React Native TimeLine ListView / Flatlist*/
import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import {Card} from  'native-base'
import Timeline from 'react-native-timeline-flatlist';

export default class LineTime extends Component {
    constructor() {
        super();
        this.data = [
            {
                time: '12 Ago',
                title: 'Event 1',
                description:
                    'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry.',
                circleColor: '#FFAD00',
            },
            {
                time: '12 Ago',
                title: 'Event 2',
                description:
                    'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
            },
            {
                time: '12 Ago',
                title: 'Event 4',
                description:
                    'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry.',
            },
            {
                time: '12 Ago',
                title: 'Event 5',
                description:
                    'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
                circleColor:'#AAB0BB',
            },
        ];
    }

    render() {
        return (
            <View style={styles.container}>
                <Timeline
                    style={styles.list}
                    data={this.data}
                    circleSize={20}
                    circleColor="#FF7F00"
                    lineColor='#AAB0BB'
                    timeContainerStyle={{ minWidth: 80, marginTop: -5 }}
                    timeStyle={{
                        textAlign: 'center',
                        color: '#0F395D',
                        fontWeight:'bold',
                        fontSize:20,
                        padding: 5,
                        borderRadius: 13,
                    }}
                    descriptionStyle={{ color: 'gray' }}
                    options={{
                        style: { paddingTop: 5 },
                    }}
                    innerCircle={'dot'}
                />
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        padding: 20,
        backgroundColor: '#F5F5F7',
    },
    list: {
        flex: 1,
    },
});
код на выставке: enter image description here Дизайн: enter image description here

Моя проблема в том, что я не знаю, как изменить библиотеки или я должен сбросить временную шкалу

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...