JSFiddle - React, Tailwind, and code Playground
by shapeshifta
JavaScript
$('form.js-update-mail-form input').on('focusin focusout', function (e) {
var $this = $(this),
parent = $this.parents('form.js-update-mail-form');
if (e.type === 'focusin') {
parent.find('.btn').addClass('focused');
parent.find('.icon-check-invert').show();
parent.find('.icon-arrow').hide();
} else {
parent.find('.btn').removeClass('focused');
parent.find('.icon-arrow').show();
parent.find('.icon-check-invert').hide();
}
});