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');
$component
.addClass('api-key')
.css('min-height', $component.height())
.html(states.keyVisible(key, thing))
.attr('aria-live', 'polite')
.on(

View File

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

View File

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