bastienrobert/la-ferme

View on GitHub
packages/mobile/src/components/svgs/WalktroughSkill.tsx

Summary

Maintainability
B
6 hrs
Test Coverage
import React, { FC } from 'react'
import { Svg, Path, SvgProps } from 'react-native-svg'
import { Colors } from '@la-ferme/components/native'

import { complementaries } from '@/utils/colors'

export interface WalktroughSkillProps extends SvgProps {
  color: Colors.Theme
}

const WalktroughSkill: FC<WalktroughSkillProps> = ({ color, ...props }) => {
  const main = Colors[color]
  const secondary = Colors[complementaries[color]]

  return (
    <Svg viewBox="0 0 337 95" width="337" height="95" fill="none" {...props}>
      <Path
        fill={secondary}
        d="M74.79 34.957L74.7461 34.0781V31.3535C74.7461 27.5742 74.8193 23.2383 74.9658 18.3457L74.8779 18.2578L77.251 18.126C84.8975 17.7158 89.8633 17.5107 92.1484 17.5107H112.627C119.629 17.5107 125.444 18.9609 130.073 21.8613C131.714 23.2676 133.047 25.1572 134.072 27.5303C135.098 29.9033 135.61 32.584 135.61 35.5723C135.61 41.3438 131.743 46.251 124.009 50.2939C128.374 51.4951 131.714 53.4287 134.028 56.0947C136.372 58.7314 137.544 61.9688 137.544 65.8066C137.544 72.6035 134.497 77.7598 128.403 81.2754C123.921 83.9121 118.252 85.2305 111.396 85.2305L98.3008 85.0547C92.6465 85.0547 85.1465 85.1865 75.8008 85.4502C74.9805 83.7217 74.5703 76.8809 74.5703 64.9277C74.5703 52.9746 74.6436 42.9844 74.79 34.957ZM102.124 71.7393C109.712 71.7393 113.506 69.0879 113.506 63.7852C113.506 60.416 112.48 58.1602 110.43 57.0176C108.584 56.0215 105.757 55.4648 101.948 55.3477H100.674L99.8828 57.8086C99.6777 60.8262 99.5752 63.7998 99.5752 66.7295C99.5752 69.6299 99.8828 71.2998 100.498 71.7393H102.124ZM111.572 42.3398C112.158 41.2266 112.451 39.8789 112.451 38.2969C112.451 35.2207 111.353 33.1553 109.155 32.1006C106.958 31.0459 104.658 30.5186 102.256 30.5186C99.8535 30.5186 98.6523 31.3975 98.6523 33.1553C98.6523 36.29 98.7256 39.498 98.8721 42.7793L98.96 45.1084C99.0186 46.2217 99.6631 46.8809 100.894 47.0859L103.047 46.8223C107.5 46.2949 110.342 44.8008 111.572 42.3398ZM144.795 62.1592L150.068 62.2031H151.606L152.178 62.1592L159.604 62.291C160.923 62.3789 161.655 63.1992 161.802 64.752C161.86 65.3672 161.934 65.9824 162.021 66.5977C162.227 68.0625 163.281 68.7949 165.186 68.7949C167.119 68.7949 168.35 67.8867 168.877 66.0703C169.258 64.6641 169.448 62.9941 169.448 61.0605V59.918H169.316L169.141 53.6777C169.023 49.6055 168.965 43.585 168.965 35.6162C168.965 27.6475 169.023 21.876 169.141 18.3018L169.097 18.2578C169.097 18.0234 169.185 17.8477 169.36 17.7305L169.932 17.6426L172.085 17.6865H188.169L191.377 17.6426H195.684C195.918 17.6426 196.094 17.7744 196.211 18.0381C196.152 18.6826 196.123 19.6641 196.123 20.9824V21.6855L196.079 22.4326L195.991 24.6738C195.786 30.2402 195.684 38.502 195.684 49.459V54.293C195.684 58.4238 195.669 61.8809 195.64 64.6641C195.61 67.418 194.922 70.1865 193.574 72.9697C192.256 75.7236 190.586 77.9355 188.564 79.6055C186.572 81.2461 184.258 82.6084 181.621 83.6924C176.963 85.5967 172.1 86.5488 167.031 86.5488C161.963 86.5488 157.729 86.0361 154.331 85.0107C151.313 84.249 148.809 83.0918 146.816 81.5391C144.854 79.957 143.33 78.4629 142.246 77.0566C139.844 73.8926 138.643 69.9961 138.643 65.3672V64.2246L138.599 63.6973C138.599 62.5547 138.774 61.9834 139.126 61.9834L144.795 62.1592ZM204.912 29.5957L204.692 18.0381C204.722 18.0381 204.824 18.082 205 18.1699C227.266 17.7891 244.038 17.584 255.317 17.5547C255.435 17.6133 255.522 17.7012 255.581 17.8184V30.2109C255.581 31.4121 255.552 32.3936 255.493 33.1553C255.347 33.624 254.482 33.8584 252.9 33.8584H252.593C245.503 33.8584 238.12 33.7412 230.444 33.5068C230.444 33.7705 230.4 34.2393 230.312 34.9131C230.254 35.5869 230.21 36.0703 230.181 36.3633L229.961 38.0332C229.814 39.1465 229.712 41.0801 229.653 43.834L243.276 43.5264C245.62 43.4678 247.319 43.4385 248.374 43.4385H249.077C250.864 43.4385 252.036 43.4971 252.593 43.6143C253.149 43.7021 253.428 43.9951 253.428 44.4932L253.384 44.8447V45.8994L253.604 57.1934L253.56 57.2373V57.1934C244.653 57.6328 237.534 57.8525 232.202 57.8525H230.137V68.4873L253.999 67.7402C255.317 67.7402 256.152 67.9307 256.504 68.3115C256.475 69.0732 256.46 70.1572 256.46 71.5635L256.768 83.5166C256.768 84.249 256.445 84.6738 255.801 84.791L241.211 84.6592C238.34 84.6592 232.627 84.7617 224.072 84.9668L216.865 85.1426C211.768 85.3184 207.988 85.4062 205.527 85.4062L205.396 85.3184H205.439C205.146 85.0254 204.868 84.7471 204.604 84.4834V82.9453L204.868 35.9678L204.912 29.5957ZM316.05 34.1221C316.05 35.0889 315.947 35.5723 315.742 35.5723C315.742 35.5723 310.439 35.5283 299.834 35.4404C299.775 38.2822 299.746 42.7207 299.746 48.7559C299.746 54.791 299.761 58.9805 299.79 61.3242L299.966 84.6152C299.819 85.0254 299.526 85.2451 299.087 85.2744L289.814 85.1426L289.771 85.1865L286.87 85.1426H278.828C276.66 85.1426 275.034 85.1572 273.95 85.1865L273.203 84.5273C273.174 84.498 272.983 84.2637 272.632 83.8242C272.632 81.2461 272.734 75.5186 272.939 66.6416L273.423 43.2627L273.335 42.1641C273.13 39.2637 272.925 37.5498 272.72 37.0225C272.544 36.4658 272.178 36.1729 271.621 36.1436C271.064 36.085 270.654 36.0557 270.391 36.0557L268.633 36.1436L257.734 35.9678C257.354 35.2061 257.163 33.4922 257.163 30.8262L257.251 26.959V25.7725C257.222 21.085 257.178 18.5801 257.119 18.2578C257.178 18.2578 257.295 18.2871 257.471 18.3457L313.413 17.8623C314.556 17.8623 315.273 17.9502 315.566 18.126C315.859 18.2725 316.006 18.5654 316.006 19.0049V30.6064L316.05 34.1221Z"
      />
      <Path
        fill={secondary}
        d="M70 49.9736C70 69.3029 54.2964 86.0646 35 84.9471C17.8212 83.9724 0 69.3029 0 49.9736C0 30.6442 15.6798 15 35 15C52.7022 15 70 30.668 70 49.9736Z"
      />
      <Path
        fill={main}
        d="M55.4727 65.3701L55.3213 71.3037V71.9092C55.3213 72.4137 55.0993 72.6862 54.6553 72.7266L42.1826 72.4541C33.5042 72.4541 24.4323 72.6559 14.9668 73.0596L14.5732 72.5449C14.2301 72.3027 14.0586 71.4046 14.0586 69.8506C14.0586 68.2764 14.0788 66.5811 14.1191 64.7646V64.5527C14.1595 62.8978 14.1797 61.6364 14.1797 60.7686C14.1797 60.4456 15.7842 59.2246 18.9932 57.1055L24.2305 53.624C27.8633 51.1214 30.6283 49.0124 32.5254 47.2969C35.8353 44.2897 37.4902 41.5853 37.4902 39.1836C37.4902 38.1341 37.1673 37.3066 36.5215 36.7012C35.8958 36.0755 35.0885 35.7627 34.0996 35.7627C33.1107 35.7627 32.3438 36.0049 31.7988 36.4893C31.2741 36.9535 30.9512 37.4782 30.8301 38.0635C30.4466 39.7588 30.0934 40.6973 29.7705 40.8789C29.1449 40.8991 28.2064 40.9092 26.9551 40.9092H17.7822L16.4199 40.8789H15.2393C14.5531 40.8789 14.1595 40.7881 14.0586 40.6064C14.2201 38.1644 14.4925 36.3682 14.876 35.2178C15.4007 33.3005 16.3291 31.6354 17.6611 30.2227C19.0133 28.7897 20.6178 27.6797 22.4746 26.8926C26.0872 25.3991 30.1439 24.6523 34.6445 24.6523C41.7285 24.6523 47.1172 26.2467 50.8105 29.4355C53.5755 31.7767 54.958 34.8747 54.958 38.7295C54.958 43.6136 52.748 48.084 48.3281 52.1406C46.1484 54.1387 43.2624 56.3083 39.6699 58.6494L37.5508 60.5566L52.3242 60.2842C53.5553 60.2842 54.3828 60.708 54.8066 61.5557C55.2507 62.4033 55.4727 63.6748 55.4727 65.3701Z"
      />
    </Svg>
  )
}

export default WalktroughSkill