mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-27 19:13:44 +03:00
Merge commit '79678332549e3343c53fb585e670f600f3f00503' into releases
This commit is contained in:
commit
68b466e034
|
@ -7,7 +7,7 @@
|
|||
<tab *ngFor="let sample of data.samples" [tabTitle]="sample.lang">
|
||||
<div class="code-sample">
|
||||
<div class="action-buttons">
|
||||
<span copy-button [copyText]="sample.source" class="hint--top hint--inversed"> <a>Copy</a> </span>
|
||||
<span copy-button [copyText]="sample.source" class="hint--top-left hint--inversed"><a>Copy</a></span>
|
||||
</div>
|
||||
<pre [innerHtml]="sample.source | prism:sample.lang"></pre>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
@import '../../shared/styles/variables';
|
||||
|
||||
:host {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
display: block;
|
||||
opacity: 0;
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
@import '../../shared/styles/variables';
|
||||
|
||||
:host {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
tab, tabs {
|
||||
display: block;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,12 @@ pre {
|
|||
padding: 0;
|
||||
margin: 0;
|
||||
clear: both;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
// hide top-level collapser
|
||||
.redoc-json > .collapser {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
|
@ -12,9 +18,15 @@ pre {
|
|||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
transform: translateY(100%);
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
|
||||
> span {
|
||||
float: right;
|
||||
|
||||
&:last-child > a:before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
> span > a {
|
||||
|
@ -28,11 +40,6 @@ pre {
|
|||
transform: translateX(-10px);
|
||||
}
|
||||
|
||||
&:last-child:before {
|
||||
display: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ export class SchemaSample extends BaseComponent {
|
|||
}
|
||||
}
|
||||
if (this.fromCache()) {
|
||||
this.initButtons();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
@ -78,8 +79,11 @@ export class SchemaSample extends BaseComponent {
|
|||
}
|
||||
this.cache(sample);
|
||||
this.data.sample = sample;
|
||||
this.initButtons();
|
||||
}
|
||||
|
||||
if (typeof sample === 'object') {
|
||||
initButtons() {
|
||||
if (typeof this.data.sample === 'object') {
|
||||
this.enableButtons = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "redoc",
|
||||
"description": "Swagger-generated API Reference Documentation",
|
||||
"version": "0.16.0",
|
||||
"version": "0.16.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/Rebilly/ReDoc"
|
||||
|
|
Loading…
Reference in New Issue
Block a user