Add svg in react native format and add it to symtom box
This commit is contained in:
@@ -0,0 +1,75 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import { G, Path } from 'react-native-svg'
|
||||||
|
|
||||||
|
export default function MucusIcon(props) {
|
||||||
|
return (
|
||||||
|
<G fill={props.active ? "white" : "black"}>
|
||||||
|
<G>
|
||||||
|
<G>
|
||||||
|
<Path d="M207.504,377.768c-16.918-6.602-30.629-12.56-47.482-20.145c-29.7-13.368-59.341-27.672-86.712-45.414
|
||||||
|
c-10.757-6.973-20.373-13.618-28.819-23.55c-1.796-2.112-4.217-6.198-4.845-8.679c-0.623-2.459-0.043,0.955-0.142-0.908
|
||||||
|
c-0.022-0.404-0.006-0.809,0.01-1.213c0.061-1.529-0.334,1.911-0.075,0.407c0.183-1.064,0.547-2.101,0.915-3.111
|
||||||
|
c-0.564,1.549,0.946-1.677,1.371-2.326c1.045-1.597-1.02,1.182,0.198-0.278c0.362-0.433,0.759-0.835,1.156-1.236
|
||||||
|
c0.399-0.404,0.831-0.774,1.261-1.143c-1.406,1.207,0.036-0.012,0.323-0.211c0.977-0.678,2.026-1.248,3.085-1.785
|
||||||
|
c0.242-0.122,2.114-0.919,0.469-0.247c0.791-0.323,1.603-0.594,2.415-0.859c6.172-2.014,10.073-2.144,16.908-2.153
|
||||||
|
c15.189-0.02,29.715,3.067,44.602,6.814c17.158,4.318,34.009,9.892,50.565,16.111c3.092,1.161,6.171,2.357,9.24,3.577
|
||||||
|
c1.318,0.524,2.633,1.057,3.946,1.594c0.678,0.277,1.354,0.557,2.03,0.838c2.003,0.832-0.633-0.273,0.502,0.208
|
||||||
|
c1.709,0.725,3.412,1.466,5.099,2.243c4.186,1.93-0.628,0.893-1.316-3.372c1.085,6.731,10.647,6.89,13.708,1.792
|
||||||
|
c1.927-3.209,1.77-8.323,2.179-11.819c0.882-7.538,1.359-15.124,1.567-22.709c0.675-24.576-1.794-49.434-7.885-73.268
|
||||||
|
c-7.63-29.857-21.829-57.994-42.894-80.625c-26.798-28.79-62.263-43.932-99.84-52.979c-3.466-0.834-6.436-1.899-9.209-3.302
|
||||||
|
c-3.389-1.715-4.487-2.523-6.811-4.868c-0.458-0.462-0.878-0.96-1.297-1.457c1.088,1.293-0.135-0.265-0.284-0.49
|
||||||
|
c-0.327-0.497-0.607-1.022-0.886-1.547c-0.911-1.717,0.513,1.473-0.147-0.312c-0.239-0.645-0.755-3.902-0.539-1.757
|
||||||
|
c-0.054-0.537-0.048-1.079-0.041-1.618c0.028-2.179-0.19,0.6,0.076-0.691c0.112-0.542,0.285-1.069,0.456-1.593
|
||||||
|
c0.587-1.797-0.713,1.432,0.146-0.299c0.264-0.531,0.582-1.033,0.899-1.533c1.073-1.696-1.001,1.128,0.325-0.469
|
||||||
|
c2.265-2.728,3.244-3.251,6.459-5.04c6.907-3.842,15.884-5.172,24.052-5.671c40.533-2.473,83.251,12.46,114.672,37.781
|
||||||
|
c40.478,32.619,65.735,80.863,84.886,128.217c1.531,3.787,4.938,6.418,9.226,5.238c3.598-0.99,6.774-5.429,5.238-9.226
|
||||||
|
c-17.593-43.5-39.484-86.479-72.692-120.257c-28.74-29.233-65.75-48.066-106.208-54.423c-21.216-3.334-44.412-4.779-64.473,4.251
|
||||||
|
c-11.728,5.279-21.003,17.252-17.123,30.545c4.302,14.741,20.418,21.001,33.917,24.032c19.569,4.393,38.447,11.404,55.719,21.644
|
||||||
|
c27.691,16.417,48.496,41.228,61.637,70.423c10.732,23.844,15.847,50.772,17.292,76.289c0.719,12.703,0.548,25.469-0.491,38.149
|
||||||
|
c-0.17,2.08-0.372,4.156-0.598,6.231c-0.093,0.858-0.194,1.716-0.299,2.573c-0.046,0.381-0.095,0.762-0.144,1.143
|
||||||
|
c-0.221,1.728,0.288-2.098,0.064-0.464c-0.135,0.981-0.281,1.961-0.441,2.939c-0.238,1.447-0.776,1.58,0.539-0.61
|
||||||
|
c4.569,0.597,9.139,1.194,13.708,1.792c-0.546-3.387-3.938-4.858-6.662-6.087c-4.064-1.833-8.192-3.53-12.326-5.2
|
||||||
|
c-12.525-5.059-25.265-9.604-38.14-13.689c-15.428-4.894-31.144-9.083-47.13-11.695c-14.167-2.314-29.086-3.777-43.211-0.387
|
||||||
|
c-11.295,2.711-21.776,10.5-24.231,22.393c-2.17,10.514,4.193,19.954,10.978,27.32c9.158,9.943,20.772,17.804,32.093,25.048
|
||||||
|
c13.837,8.854,28.323,16.691,42.953,24.145c30.069,15.321,61.075,29.17,92.518,41.44c3.814,1.488,8.226-1.604,9.226-5.238
|
||||||
|
C213.912,382.743,211.309,379.253,207.504,377.768L207.504,377.768z"/>
|
||||||
|
</G>
|
||||||
|
</G>
|
||||||
|
<G>
|
||||||
|
<G>
|
||||||
|
<Path d="M337.602,177.211c-3.923-15.29-11.505-30.082-21.181-42.47c-7.644-9.786-17.909-17.577-29.86-21.204
|
||||||
|
c-15.183-4.608-31.142-0.523-44.907,6.372c-8.65,4.333-1.051,17.271,7.571,12.952c11.236-5.629,23.378-8.128,34.988-4.344
|
||||||
|
c8.528,2.779,16.658,10.243,21.918,17.258c2.988,3.985,5.574,8.265,7.921,12.653c1.02,1.907,1.968,3.851,2.883,5.81
|
||||||
|
c0.473,1.013,0.925,2.037,1.371,3.063c0.343,0.802,0.34,0.792-0.01-0.031c0.235,0.562,0.462,1.128,0.689,1.693
|
||||||
|
c1.599,3.982,3.085,8.074,4.153,12.236C325.54,190.563,340.008,186.588,337.602,177.211L337.602,177.211z"/>
|
||||||
|
</G>
|
||||||
|
</G>
|
||||||
|
<G>
|
||||||
|
<G>
|
||||||
|
<Path d="M370.175,172.282c0,0.002,0,0.005,0,0.007c4.911-0.665,9.821-1.329,14.732-1.994c-2.262-10.021-6.785-19.12-13.425-26.983
|
||||||
|
c-15.155-17.949-39.359-20.996-61.329-17.931c-4.057,0.566-6.215,5.676-5.238,9.226c1.188,4.321,5.18,5.803,9.226,5.238
|
||||||
|
c18.149-2.532,36.136,1.101,47.695,15.228c-0.483-0.59,1.374,1.938,1.778,2.549c0.855,1.292,1.627,2.638,2.364,4
|
||||||
|
c0.668,1.234,1.266,2.505,1.837,3.787c-0.799-1.795,0.56,1.488,0.775,2.09c0.793,2.226,1.336,4.487,1.854,6.784
|
||||||
|
c1.896,8.402,14.689,6.339,14.732-1.994c0-0.002,0-0.005,0-0.007C385.225,162.607,370.225,162.611,370.175,172.282
|
||||||
|
L370.175,172.282z"/>
|
||||||
|
</G>
|
||||||
|
</G>
|
||||||
|
<G>
|
||||||
|
<G>
|
||||||
|
<Path d="M43.712,68.819c0.239,0.272,0.47,0.553,0.7,0.833c0.279,0.34,0.553,0.685,0.826,1.03c0.969,1.228-1.249-1.655,0.135,0.189
|
||||||
|
c2.498,3.328,4.78,6.815,6.936,10.372c7.22,11.912,12.26,23.965,16.03,37.321c13.048,46.228,1.749,94.154-21.682,135.069
|
||||||
|
c-4.815,8.408,8.147,15.961,12.952,7.571c24.635-43.017,36.253-92.632,24.536-141.488c-5.226-21.789-15.029-43.954-29.582-61.219
|
||||||
|
c-0.081-0.096-0.162-0.191-0.244-0.285C47.921,50.934,37.354,61.585,43.712,68.819L43.712,68.819z"/>
|
||||||
|
</G>
|
||||||
|
</G>
|
||||||
|
<G>
|
||||||
|
<G>
|
||||||
|
<Path d="M113.897,88.799c-12.33,13.358-20.381,31.576-25.213,48.833c-11.953,42.691-1.173,87.256,20.026,125.151
|
||||||
|
c4.722,8.441,17.679,0.88,12.952-7.571c-19.563-34.971-29.245-75.265-18.238-114.578c3.124-11.157,7.474-20.948,13.615-30.881
|
||||||
|
c0.989-1.6,2.028-3.168,3.098-4.715c0.544-0.788,3.524-4.756,1.855-2.606c0.802-1.034,1.623-2.065,2.511-3.027
|
||||||
|
C131.052,92.311,120.471,81.677,113.897,88.799L113.897,88.799z"/>
|
||||||
|
</G>
|
||||||
|
</G>
|
||||||
|
</G>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -6,13 +6,14 @@ import {
|
|||||||
Dimensions
|
Dimensions
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import { LocalDate } from 'js-joda'
|
import { LocalDate } from 'js-joda'
|
||||||
|
import Svg from 'react-native-svg'
|
||||||
import Header from '../header'
|
import Header from '../header'
|
||||||
import { getOrCreateCycleDay } from '../../db'
|
import { getOrCreateCycleDay } from '../../db'
|
||||||
import cycleModule from '../../lib/cycle'
|
import cycleModule from '../../lib/cycle'
|
||||||
import Icon from 'react-native-vector-icons/FontAwesome'
|
import styles from '../../styles'
|
||||||
import styles, { iconStyles } from '../../styles'
|
|
||||||
import * as labels from './labels/labels'
|
import * as labels from './labels/labels'
|
||||||
import { AppText } from '../app-text'
|
import { AppText } from '../app-text'
|
||||||
|
import MucusIcon from '../../assets/mucus'
|
||||||
|
|
||||||
const bleedingLabels = labels.bleeding
|
const bleedingLabels = labels.bleeding
|
||||||
const feelingLabels = labels.mucus.feeling.categories
|
const feelingLabels = labels.mucus.feeling.categories
|
||||||
@@ -80,7 +81,11 @@ export default class CycleDayOverView extends Component {
|
|||||||
onPress={() => this.navigate('MucusEditView')}
|
onPress={() => this.navigate('MucusEditView')}
|
||||||
data={getLabel('mucus', cycleDay.mucus)}
|
data={getLabel('mucus', cycleDay.mucus)}
|
||||||
disabled={dateInFuture}
|
disabled={dateInFuture}
|
||||||
/>
|
>
|
||||||
|
<Svg width={100} height={50} viewBox='0 0 450 450'>
|
||||||
|
<MucusIcon />
|
||||||
|
</Svg>
|
||||||
|
</SymptomBox>
|
||||||
<SymptomBox
|
<SymptomBox
|
||||||
title='Cervix'
|
title='Cervix'
|
||||||
onPress={() => this.navigate('CervixEditView')}
|
onPress={() => this.navigate('CervixEditView')}
|
||||||
@@ -222,10 +227,6 @@ class SymptomBox extends Component {
|
|||||||
render() {
|
render() {
|
||||||
const d = this.props.data
|
const d = this.props.data
|
||||||
const boxActive = d ? styles.symptomBoxActive : {}
|
const boxActive = d ? styles.symptomBoxActive : {}
|
||||||
const iconActive = d ? iconStyles.symptomBoxActive : {}
|
|
||||||
const iconStyle = Object.assign(
|
|
||||||
{}, iconStyles.symptomBox, iconActive, disabledStyle
|
|
||||||
)
|
|
||||||
const textActive = d ? styles.symptomTextActive : {}
|
const textActive = d ? styles.symptomTextActive : {}
|
||||||
const disabledStyle = this.props.disabled ? styles.symptomInFuture : {}
|
const disabledStyle = this.props.disabled ? styles.symptomInFuture : {}
|
||||||
|
|
||||||
@@ -235,10 +236,12 @@ class SymptomBox extends Component {
|
|||||||
disabled={this.props.disabled}
|
disabled={this.props.disabled}
|
||||||
>
|
>
|
||||||
<View style={[styles.symptomBox, boxActive, disabledStyle]}>
|
<View style={[styles.symptomBox, boxActive, disabledStyle]}>
|
||||||
<Icon
|
|
||||||
name='thermometer'
|
{this.props.children ?
|
||||||
{...iconStyle}
|
React.cloneElement(this.props.children, {active: true})
|
||||||
/>
|
: null
|
||||||
|
}
|
||||||
|
|
||||||
<AppText style={[textActive, disabledStyle]}>
|
<AppText style={[textActive, disabledStyle]}>
|
||||||
{this.props.title}
|
{this.props.title}
|
||||||
</AppText>
|
</AppText>
|
||||||
|
|||||||
Reference in New Issue
Block a user