mirror of https://github.com/Squidex/squidex.git
15 changed files with 116 additions and 160 deletions
@ -0,0 +1,7 @@ |
|||
<div class="copy-container"> |
|||
<button type="button" class="copy-button" [sqxCopy]="codeBlock"> |
|||
<i class="icon-copy"></i> |
|||
</button> |
|||
|
|||
<pre class="code" #codeBlock><ng-content></ng-content></pre> |
|||
</div> |
|||
@ -0,0 +1,36 @@ |
|||
@import '_mixins'; |
|||
@import '_vars'; |
|||
|
|||
.code { |
|||
background: $color-code-background; |
|||
padding-left: .5rem; |
|||
padding-right: .5rem; |
|||
margin: .25rem 0; |
|||
} |
|||
|
|||
.code, |
|||
.copy-button { |
|||
font-size: .8rem; |
|||
padding-top: .25rem; |
|||
padding-bottom: .25rem; |
|||
min-height: 27px; |
|||
} |
|||
|
|||
.copy-container { |
|||
position: relative; |
|||
} |
|||
|
|||
.copy-button { |
|||
& { |
|||
@include absolute(0, 0, auto, auto); |
|||
border: 0; |
|||
background: darken($color-border-dark, 30%); |
|||
padding-left: .375rem; |
|||
padding-right: .375rem; |
|||
color: $color-dark-foreground; |
|||
} |
|||
|
|||
&:focus { |
|||
background: darken($color-border-dark, 40%); |
|||
} |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
/* |
|||
* Squidex Headless CMS |
|||
* |
|||
* @license |
|||
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. |
|||
*/ |
|||
|
|||
import { ChangeDetectionStrategy, Component } from '@angular/core'; |
|||
|
|||
@Component({ |
|||
selector: 'sqx-code', |
|||
styleUrls: ['./code.component.scss'], |
|||
templateUrl: './code.component.html', |
|||
changeDetection: ChangeDetectionStrategy.OnPush |
|||
}) |
|||
export class CodeComponent { |
|||
} |
|||
Loading…
Reference in new issue