rohit563
rohit563

Reputation: 123

How to hide Iron-Icon in gold-cc-cvc-input in Polymer?

Can anyone point me in the right direction of correctly hiding an iron-icon in a gold element? (gold-cc-cvc-input)

enter image description here

I've tried the following and it didn't work:

<gold-cc-cvc-input style="iron-icon: display:none;" card-type="" name="cvc" id="cvcInput" auto-validate required ></gold-cc-cvc-input>

Upvotes: 1

Views: 453

Answers (1)

tony19
tony19

Reputation: 138356

There's a --gold-cc-cvc-input-icon mixin for the icon, but it's not yet released. The workaround is to set the icon's style imperatively. The icon IDs are icon and amexIcon, so you could do:

<gold-cc-cvc-input id="cvc"></gold-cc-cvc-input>

// <script>
attached: function() {
  this.$.cvc.$.icon.style.display = 'none';
  this.$.cvc.$.amexIcon.style.display = 'none';
}

codepen

Upvotes: 1

Related Questions