File tree Expand file tree Collapse file tree 1 file changed +19
-12
lines changed
Expand file tree Collapse file tree 1 file changed +19
-12
lines changed Original file line number Diff line number Diff line change 33 * Created by rouge on 11/09/2019.
44 */
55import React from 'react' ;
6- import { View } from 'react-native' ;
7- import { IPropEmptyDot } from './types/Dot' ;
6+ import { StyleSheet , View } from 'react-native' ;
87
98export const defaultEmptyDotSize = 3 ;
109
11- const EmptyDot = (
12- props : IPropEmptyDot
13- ) : React . FunctionComponentElement < IPropEmptyDot > => {
10+ const EmptyDot : React . FC < {
11+ sizeRatio : number ;
12+ } > = ( props ) => {
1413 return (
1514 < View
16- style = { {
17- backgroundColor : 'white' ,
18- opacity : 0.0 ,
19- width : defaultEmptyDotSize * props . sizeRatio ,
20- height : defaultEmptyDotSize * props . sizeRatio ,
21- margin : defaultEmptyDotSize * props . sizeRatio ,
22- } }
15+ style = { [
16+ styles . base ,
17+ {
18+ width : defaultEmptyDotSize * props . sizeRatio ,
19+ height : defaultEmptyDotSize * props . sizeRatio ,
20+ margin : defaultEmptyDotSize * props . sizeRatio ,
21+ } ,
22+ ] }
2323 />
2424 ) ;
2525} ;
2626
27+ const styles = StyleSheet . create ( {
28+ base : {
29+ backgroundColor : 'white' ,
30+ opacity : 0.0 ,
31+ } ,
32+ } ) ;
33+
2734export default EmptyDot ;
You can’t perform that action at this time.
0 commit comments