Add Icon to Phone Number

Hi Team,

A client of mine is looking to append the phone icon in front of the phone number on their location card. Would you be able to advise on how the handlebars file should be edited to support this?

As per the screenshot below, we need a black phone icon to be added in front of the phone number, let me know if this is possible. Thanks!


I resolved this by following the guide here. I set the template.hbs to the below, see the addition of the phoneIcon div:

{{#*inline 'phone'}}
<div class="HitchhikerLocationStandard-phone">
 <div class="HitchhikerLocationStandard-phoneIcon">
   <svg xmlns="" width="20" height="20" viewBox="0 0 24 24"><path d="M4.827 10.387a20.198 20.198 0 008.786 8.786l2.934-2.933c.36-.36.893-.48 1.36-.32a15.21 15.21 0 004.76.76c.733 0 1.333.6 1.333 1.333v4.654C24 23.4 23.4 24 22.667 24 10.147 24 0 13.853 0 1.333 0 .6.6 0 1.333 0H6c.733 0 1.333.6 1.333 1.333 0 1.667.267 3.267.76 1.36l-2.933 2.934z"></path></svg>
 <a class="HitchhikerLocationStandard-desktopMobile"
   data-eventoptions='{{json card.phoneEventOptions}}'

I then added the following to the answers.scss file:

  .HitchhikerLocationStandard-phoneIcon {
    height: 1em;
    width: 1em;
    margin-top: .1rem;
    fill: black;
    margin-right: .25rem;

The end result was as follows.


1 Like