SHARE
TWEET

Untitled

a guest Mar 20th, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. componentDidMount() {
  2. // Change text hardcoded in plugin
  3. const ontext = document.getElementsByClassName('react-toggle-track-check');
  4. for (let idx = 0; idx < ontext.length; idx++) {
  5.   ontext[idx].innerHTML = '<svg width="50" height="11" viewBox="0 0 50 11"><text x="20" y="9" style="font-size: 10; fill:#FFFFFF">ON</text><text x="38" y="9" style="font-family: FontAwesome;font-size: 12px;  fill:#FFFFFF;"">&#xf023;</text></svg>';
  6. }
  7. const offtext = document.getElementsByClassName('react-toggle-track-x');
  8. for (let idx = 0; idx < offtext.length; idx++) {
  9.   offtext[idx].style.width = '15px';
  10.   offtext[idx].innerHTML = '<svg width="50" height="11" viewBox="0 0 50 11"><text x="0" y="9" style="font-size: 10; fill:#FFFFFF">OFF</text><text x="23" y="9" style="font-family: FontAwesome;font-size: 12px;  fill:#FFFFFF;">&#xf023;</text></svg>';
  11.   }
  12. }
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top