Files
2022-08-23 12:52:38 +02:00

41 lines
834 B
JavaScript

import React from 'react'
import PropTypes from 'prop-types'
import { StyleSheet, View } from 'react-native'
import Tick from './tick'
import { getTickList } from '../helpers/chart'
const TickList = ({ height }) => {
return (
<View style={[styles.container, height]}>
{getTickList(height).map(
({ isBold, label, position, shouldShowLabel, tickHeight }) => {
return (
<Tick
height={tickHeight}
isBold={isBold}
key={label}
label={label}
shouldShowLabel={shouldShowLabel}
yPosition={position}
/>
)
}
)}
</View>
)
}
TickList.propTypes = {
height: PropTypes.number,
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
})
export default TickList