diff --git a/app/assets/javascripts/apiKey.js b/app/assets/javascripts/apiKey.js index 79c2540b4..91c32d399 100644 --- a/app/assets/javascripts/apiKey.js +++ b/app/assets/javascripts/apiKey.js @@ -7,12 +7,12 @@ const states = { 'keyVisible': (key, thing) => ` - ${key} - + ${key} + `, 'keyCopied': thing => ` - Copied to clipboard - + Copied to clipboard + ` }; @@ -39,14 +39,14 @@ .html(states.keyVisible(key, thing)) .attr('aria-live', 'polite') .on( - 'click', '.api-key-button-copy', () => + 'click', '.api-key__button--copy', () => this.copyKey( - $('.api-key-key', component)[0], () => + $('.api-key__key', component)[0], () => $component.html(states.keyCopied(thing)) ) ) .on( - 'click', '.api-key-button-show', () => + 'click', '.api-key__button--show', () => $component.html(states.keyVisible(key, thing)) ); diff --git a/app/assets/stylesheets/components/api-key.scss b/app/assets/stylesheets/components/api-key.scss index a144a0c89..4a723e5fd 100644 --- a/app/assets/stylesheets/components/api-key.scss +++ b/app/assets/stylesheets/components/api-key.scss @@ -4,22 +4,21 @@ padding-bottom: 38px; // height of button display: flex; - &-name { + &__name { @include bold-19; margin-bottom: 5px; } - &-key { + &__key { font-family: monospace; display: block; padding: 0 0 10px 0; margin: auto 0; } - &-button-show, - &-button-copy { + &__button--show, + &__button--copy { - @include button($grey-3); position: absolute; bottom: 2px; diff --git a/app/templates/components/api-key.html b/app/templates/components/api-key.html index dc5e6c2ee..b2cd6e4aa 100644 --- a/app/templates/components/api-key.html +++ b/app/templates/components/api-key.html @@ -1,10 +1,10 @@ {% macro api_key(key, name=None, thing="API key") %} {% if name %} -