Skip to content

Commit

Permalink
feat: [#51] CeDefault pretty format
Browse files Browse the repository at this point in the history
  • Loading branch information
PanMisza authored and mercs600 committed Oct 6, 2020
1 parent ef5c724 commit 3f95fd0
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions lib/templates/components/content/elements/CeDefault.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@ export default {
functional: true,
render(createElement, ctx) {
return createElement(
'code',
'pre',
{
style: {
display: 'block',
maxWidth: '100%',
wordBreak: 'break-word'
overflowX: 'scroll'
}
},
JSON.stringify(ctx.props)
[
createElement(
'code',
{
style: {
fontSize: '12px',
fontFamily:
'SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace'
}
},
[JSON.stringify(ctx.props, null, 2)]
)
]
)
}
}

0 comments on commit 3f95fd0

Please sign in to comment.