Merge pull request #2428 from alphagov/api-key-page-neatness

Make API key page handle multiple lines of text better
This commit is contained in:
Chris Hill-Scott
2018-11-07 11:17:53 +00:00
committed by GitHub
3 changed files with 20 additions and 3 deletions

View File

@@ -34,6 +34,8 @@
thing = $component.data('thing'); thing = $component.data('thing');
$component $component
.addClass('api-key')
.css('min-height', $component.height())
.html(states.keyVisible(key, thing)) .html(states.keyVisible(key, thing))
.attr('aria-live', 'polite') .attr('aria-live', 'polite')
.on( .on(

View File

@@ -1,5 +1,9 @@
.api-key { .api-key {
position: relative;
padding-bottom: 38px; // height of button
display: flex;
&-name { &-name {
@include bold-19; @include bold-19;
margin-bottom: 5px; margin-bottom: 5px;
@@ -8,12 +12,21 @@
&-key { &-key {
font-family: monospace; font-family: monospace;
display: block; display: block;
margin-bottom: 10px; padding: 0 0 10px 0;
margin: auto 0;
} }
&-button-show, &-button-show,
&-button-copy { &-button-copy {
@include button($grey-3); @include button($grey-3);
position: absolute;
bottom: 2px;
&:active {
top: auto;
}
} }
} }

View File

@@ -14,8 +14,10 @@
</h1> </h1>
<p> <p>
Copy your key to somewhere safe. You wont be able to see it again Copy your key to somewhere safe.
once you leave this page. </p>
<p>
You wont be able to see it again once you leave this page.
</p> </p>
<div class="bottom-gutter-2"> <div class="bottom-gutter-2">