Adding VerticalLayout rendering component

This commit is contained in:
Jeff Avallone
2019-01-30 18:12:23 -05:00
parent 67ca83ff16
commit 91ab1dbd05
5 changed files with 245 additions and 9 deletions
+31 -4
View File
@@ -1,6 +1,9 @@
import Render from 'components/Render';
import layout from 'layout';
const type = 'JS';
const description = 'JavaScript';
const parse = expr => {
return {
type: 'SVG',
@@ -29,15 +32,39 @@ const parse = expr => {
},
children: [
{
type: 'Box',
type: 'VerticalLayout',
props: {
theme: 'literal'
withConnectors: true
},
children: [
{
type: 'Text',
type: 'Box',
props: {
theme: 'literal',
label: 'Type'
},
children: [
'JS'
{
type: 'Text',
children: [
type
]
}
]
},
{
type: 'Box',
props: {
theme: 'literal',
label: 'Description'
},
children: [
{
type: 'Text',
children: [
description
]
}
]
}
]
+31 -4
View File
@@ -1,6 +1,9 @@
import Render from 'components/Render';
import layout from 'layout';
const type = 'PCRE';
const description = 'Perl-compatible Regular Expression';
const parse = expr => {
return {
type: 'SVG',
@@ -29,15 +32,39 @@ const parse = expr => {
},
children: [
{
type: 'Box',
type: 'VerticalLayout',
props: {
theme: 'literal'
withConnectors: true
},
children: [
{
type: 'Text',
type: 'Box',
props: {
theme: 'literal',
label: 'Type'
},
children: [
'PCRE'
{
type: 'Text',
children: [
type
]
}
]
},
{
type: 'Box',
props: {
theme: 'literal',
label: 'Description'
},
children: [
{
type: 'Text',
children: [
description
]
}
]
}
]