Skip to content

Commit

Permalink
fix(exercice): style flèche de l'évolution de l'intensité de l'émotion
Browse files Browse the repository at this point in the history
  • Loading branch information
tangimds committed Dec 23, 2021
1 parent faa7cdf commit 8c59419
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
19 changes: 19 additions & 0 deletions assets/svg/ArrowRightStick.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as React from 'react';
import Svg, {Path} from 'react-native-svg';

const SvgComponent = (props) => (
<Svg
width={21}
height={12}
viewBox="0 0 21 12"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}>
<Path
d="M16.198 0c-.178-.004-.34.128-.412.33a.648.648 0 0 0 .09.599l3.49 4.529H.443c-.157-.002-.304.1-.383.27a.656.656 0 0 0 0 .55c.079.17.226.272.383.27h18.923l-3.49 4.53a.644.644 0 0 0 .014.77c.175.209.451.202.619-.017L21 6.003 16.509.175A.408.408 0 0 0 16.198 0Z"
fill="currentColor"
/>
</Svg>
);

export default SvgComponent;
6 changes: 4 additions & 2 deletions src/scenes/exercise/exercise-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {parseISO, differenceInDays} from 'date-fns';

import Icon from '../../components/Icon';
import {colors} from '../../utils/colors';
import ArrowRightStick from '../../../assets/svg/ArrowRightStick';

export default ({patientState, date, navigation}) => {
const data = patientState?.becks;
Expand Down Expand Up @@ -46,10 +47,11 @@ export default ({patientState, date, navigation}) => {
<>
<Text>
{beck?.mainEmotion} -{' '}
{`${beck?.mainEmotionIntensity * 10}%`}
{`${beck?.mainEmotionIntensity * 10}% `}
{beck?.mainEmotionIntensityNuanced ? (
<Text style={styles.mainEmotionIntensityNuancedStyle}>
{' →'} {beck?.mainEmotionIntensityNuanced * 10}%
<ArrowRightStick color={colors.LIGHT_BLUE} />{' '}
{beck?.mainEmotionIntensityNuanced * 10}%
</Text>
) : null}
</Text>
Expand Down

0 comments on commit 8c59419

Please sign in to comment.