Skip to content

Commit

Permalink
feat(stark-ui): implement the Stark-Pretty-Print component
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #494, #496
  • Loading branch information
RobbyDeLaet committed Jul 13, 2018
1 parent 90c53fe commit 22f84b6
Show file tree
Hide file tree
Showing 18 changed files with 1,129 additions and 72 deletions.
5 changes: 4 additions & 1 deletion packages/stark-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
"dependencies": {
"@mdi/angular-material": "2.4.85",
"@types/nouislider": "9.0.4",
"nouislider": "11.1.0"
"@types/prismjs": "1.9.0",
"nouislider": "11.1.0",
"pretty-data": "0.40.0",
"prismjs": "1.15.0"
},
"devDependencies": {
"@nationalbankbelgium/stark-testing": "../stark-testing"
Expand Down
1 change: 1 addition & 0 deletions packages/stark-ui/src/modules.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from "./modules/action-bar";
export * from "./modules/app-logo";
export * from "./modules/pretty-print";
export * from "./modules/slider";
export * from "./modules/svg-view-box";
2 changes: 2 additions & 0 deletions packages/stark-ui/src/modules/pretty-print.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "./pretty-print/pretty-print.module";
export * from "./pretty-print/components";
1 change: 1 addition & 0 deletions packages/stark-ui/src/modules/pretty-print/components.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./components/pretty-print.component";
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* ============================================================================== */
/* S t a r k P r e t t y P r i n t */
/* ============================================================================== */
/* stark: src/modules/pretty-print/components/_pretty-print-theme.scss */

.stark-pretty-print {
& pre,
& pre[class*="language-"] > code {
white-space: pre-wrap;
word-wrap: break-word;
}
}

/* end stark: src/modules/pretty-print/components/_pretty-print-theme.scss */
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div>
<div *ngIf="highlightingEnabled">
<div [innerHTML]="prettyString"></div>
</div>
<div *ngIf="!highlightingEnabled">
<pre>{{ prettyString }}</pre>
</div>
</div>
Loading

0 comments on commit 22f84b6

Please sign in to comment.