From 77eeb53a489db44660298ed51bb782b0e8a50180 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Tue, 1 Nov 2016 17:21:32 +0200 Subject: [PATCH] Render pattern property (#42) --- lib/components/JsonSchema/_json-schema-common.scss | 14 ++++++++++++++ lib/components/JsonSchema/json-schema.html | 4 +++- lib/components/ParamsList/params-list.html | 7 +++++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/lib/components/JsonSchema/_json-schema-common.scss b/lib/components/JsonSchema/_json-schema-common.scss index da8abf4156..bc4d44d32b 100644 --- a/lib/components/JsonSchema/_json-schema-common.scss +++ b/lib/components/JsonSchema/_json-schema-common.scss @@ -193,6 +193,20 @@ $sub-schema-offset: ($bullet-size / 2) + $bullet-margin; } } +.param-pattern { + color: $nullable-color; + white-space: nowrap; + + &::before, + &::after { + content: '/'; + margin: 0 3px; + font-size: 1.2em; + font-weight: bold; + vertical-align: bottom; + } +} + .param-default { font-size: 0.95em; diff --git a/lib/components/JsonSchema/json-schema.html b/lib/components/JsonSchema/json-schema.html index 495f2d7f7f..295f2d1a88 100644 --- a/lib/components/JsonSchema/json-schema.html +++ b/lib/components/JsonSchema/json-schema.html @@ -23,8 +23,9 @@ Nullable
- {{enumItem.val | json}} + {{enumItem.val | json}}
+ {{schema.pattern}}