stone-payments / emerald-web-framework

A open-source framework that makes it easy to build top quality components for high-performance financial applications
Apache License 2.0
82 stars 11 forks source link

Use assets on sling-web-component-brand-icon #93

Open renanrbs opened 5 years ago

renanrbs commented 5 years ago

I'm submitting a: [ ] bug report [x ] feature request [ ] support request

Current behavior: sling-web-component-brand-icon is writing all of the icons it uses, directly on javascript

Expected behavior: read the icons images from assets folder

Related code:

 case 1: // visa
        return `
        <svg width="100%" height="100%" viewBox="0 0 160 52">
          <g id="visa" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
              <g id="SVG" transform="translate(-707.000000, -200.000000)" fill="#1A1F71" fill-rule="nonzero">
                  <g id="brands-sprite">
                      <g id="Artboard" transform="translate(707.000000, 0.000000)">
                          <g id="Visa-copy" transform="translate(0.000000, 200.000000)">
                              <g id="Group-5">
                                  <path d="M60.7474159,0.910870225 L39.7991048,50.7953809 L26.1335046,50.7953809 L15.8242277,10.9840753 C15.1995483,8.53612999 14.6548727,7.6361631 12.7539697,6.60182001 C9.64474311,4.91563449 4.51209837,3.33936635 0,2.35865587 L0.304959278,0.911164909 L22.305129,0.911164909 C25.1073299,0.911164909 27.6281888,2.7723931 28.2694004,5.99418028 L33.7149753,34.8626664 L47.1647717,0.911164909 L60.7474159,0.910870225 Z M114.293601,34.5093395 C114.350578,21.3445979 96.0621727,20.614664 96.183507,14.7327586 C96.2233613,12.9452016 97.9306018,11.0412441 101.665689,10.5547198 C103.516995,10.3160252 108.625432,10.1238908 114.416706,12.7872506 L116.681612,2.2045358 C113.570614,1.08178732 109.56806,0 104.588633,0 C91.8072085,0 82.8157808,6.77627332 82.7437479,16.4887844 C82.6622679,23.6708385 89.1667866,27.675308 94.0570581,30.0666739 C99.0990712,32.511083 100.789189,34.079984 100.764686,36.2641866 C100.729555,39.6109201 96.7432386,41.0925944 93.0329499,41.1485845 C86.5284313,41.249956 82.7590991,39.3943268 79.7543794,37.9960482 L77.4079937,48.9317952 C80.4336739,50.3141609 86.0085539,51.5173583 91.7809341,51.5789474 C105.368597,51.578358 114.253746,44.8810602 114.293601,34.5093395 Z M148.045478,50.7953809 L160,50.7953809 L149.555514,0.910870225 L138.527678,0.910870225 C136.041655,0.910870225 133.94768,2.34952064 133.019813,4.56761193 L113.620211,50.7953809 L127.198426,50.7953809 L129.894054,43.3454585 L146.479056,43.3454585 L148.045478,50.7953809 Z M133.61379,33.1222589 L140.42002,14.3882723 L144.33519,33.1222589 L133.61379,33.1222589 Z M79.2212173,0.910870225 L68.531996,50.7953809 L55.6029625,50.7953809 L66.2930694,0.910870225 L79.2212173,0.910870225 Z" id="Shape"></path>
                              </g>
                          </g>
                      </g>
                  </g>
              </g>
          </g>
        </svg>
        `;
gabrielclima commented 5 years ago

Hi, guys! Can i take?

renanrbs commented 5 years ago

Go ahead