Simplify active state
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
Dimensions
|
||||
} from 'react-native'
|
||||
import { LocalDate } from 'js-joda'
|
||||
import Svg from 'react-native-svg'
|
||||
import Svg, { G } from 'react-native-svg'
|
||||
import Header from '../header'
|
||||
import { getOrCreateCycleDay } from '../../db'
|
||||
import cycleModule from '../../lib/cycle'
|
||||
@@ -260,7 +260,9 @@ class SymptomBox extends Component {
|
||||
React.Children.map(this.props.children, child => {
|
||||
return (
|
||||
<Svg width={100} height={50} viewBox={child.props.viewBox}>
|
||||
{React.cloneElement(child, { active: !!d })}
|
||||
<G fill={d ? 'white' : 'black'}>
|
||||
{child}
|
||||
</G>
|
||||
</Svg>
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user