Skip to content

Commit

Permalink
feat(docs): styling missing code example (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
Margar1ta authored and pimenovoleg committed Oct 11, 2019
1 parent ec8e0f3 commit 7e4a862
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@mixin example-viewer-theme($theme) {
$foreground: map-get($theme, foreground);
$error: map-get($theme, error);
$error-border: mc-color($error, 200);
$error-background: mc-color($error, 60);
$divider: mc-color($foreground, divider);
$hint-text: mc-color($foreground, hint-text);

Expand All @@ -16,4 +19,10 @@
background-color: $divider;

}

.docs-example-viewer__lost-example {
border: 1px solid $error-border;
background-color: $error-background;
padding: 16px;
}
}
11 changes: 9 additions & 2 deletions packages/docs/src/app/shared/example-viewer/example-viewer.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div class="docs-example-viewer__wrapper">
<div class="docs-example-viewer__example">
<div *ngIf="exampleData" class="docs-example-viewer__example">
<div class="docs-example-viewer-body">
<ng-template [cdkPortalOutlet]="selectedPortal"></ng-template>
</div>
</div>

<div [class.docs-example-viewer__source]="true"
<div *ngIf="exampleData; else lostExample" [class.docs-example-viewer__source]="true"
[class.docs-example-viewer__source_hidden]="!showSource">
<stackblitz-button [example]="example"></stackblitz-button>
<mc-tab-group mc-light-tabs (selectedTabChange)="setNumbers()">
Expand Down Expand Up @@ -45,4 +45,11 @@
</span>
</div>
</div>

<ng-template #lostExample>
<p class="docs-example-viewer__lost-example">Oops, this code example is lost... But you can help us find it!
Just send a Pull Request to this repository:
<a class="docs-markdown__a" href="https://github.com/positive-js/mosaic.">Mosaic</a>
</p>
</ng-template>
</div>

0 comments on commit 7e4a862

Please sign in to comment.