0

I have an svg here (like another 100 svg's) and I'm saving them into an array so they can be picked through an icon provider in react.

However: all of them are saved with their paths. Although this one has a rect - Is there any way to turn this rect into a path?

<svg xmlns="http://www.w3.org/2000/svg" width="42" height="42" viewBox="0 0 42 42">
    <g fill="none" transform="translate(0 8)">
        <rect width="42" height="26.376" fill="#2557D6" rx="4"/>
        <path fill="#FFF" d="M0 12.386h2.018l.454-1.092h1.019l.453 1.092h3.97v-.835l.354.839h2.06l.355-.851v.847h9.864l-.004-1.793h.19c.134.005.173.017.173.237v1.556h5.102v-.417c.412.22 1.052.417 1.894.417h2.146l.46-1.092h1.018l.45 1.092h4.136V11.35l.626 1.037h3.314v-6.86h-3.28v.81l-.46-.81h-3.365v.81l-.422-.81H27.98c-.761 0-1.43.106-1.97.4v-.4H22.87v.4c-.344-.303-.813-.4-1.334-.4H10.075l-.77 1.772-.79-1.772h-3.61v.81l-.396-.81h-3.08L0 8.788v3.598zm12.734-.99h-1.21l-.005-3.852-1.712 3.853H8.771L7.054 7.54v3.856H4.653L4.199 10.3H1.741l-.459 1.097H0l2.114-4.92H3.87l2.008 4.658V6.478h1.927l1.545 3.337 1.42-3.337h1.965v4.919zM3.796 9.28l-.809-1.961-.803 1.96h1.612zm13.755 2.118h-3.944v-4.92h3.944v1.025h-2.763v.887h2.697v1.008h-2.697v.982h2.763v1.018zm5.559-3.594c0 .784-.526 1.19-.832 1.31.258.099.479.272.584.415.167.245.195.463.195.903v.966h-1.19l-.005-.62c0-.296.028-.722-.186-.959-.173-.173-.436-.21-.861-.21h-1.267v1.789h-1.181v-4.92h2.716c.603 0 1.048.017 1.43.237.373.22.597.54.597 1.089zm-1.493.73c-.162.098-.354.101-.584.101H19.6V7.542h1.454c.206 0 .42.009.56.089.153.071.248.224.248.434 0 .215-.09.388-.244.468zm3.386 2.864H23.8v-4.92h1.204v4.92zm13.986 0h-1.673l-2.238-3.692v3.692h-2.405l-.46-1.097h-2.452l-.446 1.097h-1.382c-.573 0-1.3-.127-1.712-.544-.415-.418-.63-.984-.63-1.878 0-.73.129-1.397.636-1.924.382-.392.98-.573 1.793-.573h1.143v1.054h-1.119c-.43 0-.674.064-.908.291-.202.207-.34.599-.34 1.115 0 .526.105.906.325 1.155.182.194.512.253.823.253h.53l1.664-3.868h1.77l1.998 4.653V6.478h1.798l2.075 3.426V6.478h1.21v4.919zm-7.177-2.118l-.817-1.961-.813 1.96h1.63zM41.998 19.251c-.287.418-.846.63-1.603.63h-2.28v-1.056h2.271c.225 0 .383-.03.478-.122.082-.076.14-.186.14-.32 0-.144-.058-.258-.145-.326-.085-.075-.21-.109-.416-.109-1.108-.038-2.491.034-2.491-1.523 0-.713.455-1.465 1.694-1.465h2.352v-.979h-2.186c-.66 0-1.138.158-1.477.402v-.402h-3.232c-.517 0-1.124.128-1.411.402v-.402H27.92v.402c-.459-.33-1.234-.402-1.592-.402h-3.807v.402c-.363-.35-1.171-.402-1.664-.402h-4.26l-.976 1.051-.913-1.05H8.344v6.865h6.244l1.005-1.068.946 1.068 3.85.003v-1.615h.378c.511.008 1.113-.013 1.645-.241v1.852h3.175v-1.789h.153c.195 0 .215.008.215.203v1.586H35.6c.612 0 1.252-.156 1.607-.439v.44h3.06c.636 0 1.258-.09 1.73-.317V19.25zm-19.125-2.64c0 1.366-1.024 1.648-2.056 1.648h-1.473v1.65h-2.295l-1.454-1.628-1.51 1.629H9.406v-4.92h4.75l1.452 1.612 1.502-1.613h3.773c.937 0 1.99.259 1.99 1.621zm-9.387 2.264h-2.903v-.98h2.593v-1.003h-2.593v-.895h2.96l1.292 1.434-1.349 1.444zm4.678.563l-1.813-2.004 1.813-1.94v3.944zm2.68-2.188H19.32v-1.253h1.54c.426 0 .722.173.722.604 0 .425-.283.65-.736.65zm7.994-2.26h3.941v1.017h-2.765v.894h2.698v1.004h-2.698v.98l2.765.004v1.02h-3.94v-4.92zm-1.515 2.633c.263.097.478.27.579.413.166.24.19.464.195.898v.976h-1.185v-.616c0-.296.029-.734-.19-.963-.173-.176-.436-.218-.867-.218h-1.262v1.797h-1.186v-4.92h2.726c.597 0 1.033.026 1.42.232.373.224.607.53.607 1.092 0 .785-.526 1.186-.837 1.309zm-.667-.622c-.158.093-.353.101-.583.101h-1.434v-1.105h1.453c.21 0 .421.005.564.09.153.079.244.231.244.442 0 .21-.091.38-.244.472zm10.659.313c.23.237.353.536.353 1.043 0 1.058-.664 1.552-1.855 1.552h-2.3v-1.055h2.29c.225 0 .384-.03.483-.121.081-.077.14-.187.14-.321 0-.144-.063-.258-.144-.326-.09-.075-.215-.109-.42-.109-1.105-.037-2.488.034-2.488-1.523 0-.713.45-1.465 1.688-1.465h2.367v1.048h-2.166c-.214 0-.354.008-.473.088-.13.08-.177.198-.177.354 0 .186.11.312.258.367.125.043.259.056.46.056l.635.017c.641.015 1.081.126 1.349.395zM42 15.997h-2.152c-.215 0-.357.008-.478.09-.124.079-.172.197-.172.353 0 .186.105.312.258.367.125.043.258.055.455.055l.64.018c.646.015 1.077.126 1.34.396.047.037.076.08.109.121v-1.4z"/>
    </g>
</svg>
Sascha Rissling
  • 253
  • 5
  • 15

0 Answers0