1
1
import React , { useState , useCallback , useMemo } from 'react' ;
2
2
import { StyleSheet , StyleProp , ViewProps , ViewStyle , LayoutChangeEvent } from 'react-native' ;
3
3
import View from '../view' ;
4
- import { Colors } from '../../style' ;
5
4
6
5
//TODO: move to some global types (shared with Timeline component)
7
6
export type Layout = {
@@ -35,11 +34,10 @@ const Dash = (props: DashProps) => {
35
34
width : vertical ? thickness : length ,
36
35
height : vertical ? length : thickness ,
37
36
marginRight : vertical ? 0 : gap ,
38
- marginBottom : vertical ? gap : 0 ,
39
- backgroundColor : color
37
+ marginBottom : vertical ? gap : 0
40
38
} ;
41
39
return [ style , _style ] ;
42
- } , [ vertical , length , thickness , gap , color , style ] ) ;
40
+ } , [ vertical , length , thickness , gap , style ] ) ;
43
41
44
42
const lineStyle = useMemo ( ( ) => {
45
43
const directionStyle = vertical ? styles . column : styles . row ;
@@ -56,7 +54,7 @@ const Dash = (props: DashProps) => {
56
54
const dash = [ ] ;
57
55
58
56
for ( let i = 0 ; i < n ; i ++ ) {
59
- dash . push ( < View key = { i } style = { dashStyle } /> ) ;
57
+ dash . push ( < View key = { i } bg-$outlineDefault backgroundColor = { color } style = { dashStyle } /> ) ;
60
58
}
61
59
62
60
return dash ;
@@ -73,8 +71,7 @@ export default Dash;
73
71
Dash . defaultProps = {
74
72
gap : 6 ,
75
73
length : 6 ,
76
- thickness : 2 ,
77
- color : Colors . black
74
+ thickness : 2
78
75
} ;
79
76
80
77
const styles = StyleSheet . create ( {
0 commit comments