11import React , { useCallback , useMemo , useEffect , useState , useRef } from 'react' ;
22import { StyleSheet , MeasureOnSuccessCallback , LayoutChangeEvent } from 'react-native' ;
33import { Colors , Spacings } from '../../style' ;
4+ import { useThemeProps } from '../../hooks' ;
45import View from '../view' ;
56import Point from './Point' ;
67import Line from './Line' ;
@@ -17,9 +18,9 @@ export {
1718const CONTENT_CONTAINER_PADDINGS = Spacings . s2 ;
1819const ENTRY_POINT_HEIGHT = 2 ;
1920
20-
2121const Timeline = ( props : TimelineProps ) => {
22- const { topLine, bottomLine, point, children} = props ;
22+ const themeProps = useThemeProps ( props , 'Timeline' ) ;
23+ const { topLine, bottomLine, point, children} = themeProps ;
2324 const [ anchorMeasurements , setAnchorMeasurements ] = useState < Layout | undefined > ( ) ;
2425 const [ contentContainerMeasurements , setContentContainerMeasurements ] = useState < Layout | undefined > ( ) ;
2526 const [ pointMeasurements , setPointMeasurements ] = useState < Layout | undefined > ( ) ;
@@ -59,7 +60,7 @@ const Timeline = (props: TimelineProps) => {
5960 return Colors . $backgroundDangerHeavy ;
6061 case StateTypes . SUCCESS :
6162 return Colors . $backgroundSuccessHeavy ;
62- default :
63+ default :
6364 return Colors . $backgroundPrimaryHeavy ;
6465 }
6566 } ;
0 commit comments