* make widget docs editable * update widget doc frontmatter keys * improve docs preview * fix formatting * fix preview * add prism highlighting for previews * fix formatting * restore cms branch
12 lines
319 B
JavaScript
12 lines
319 B
JavaScript
import React from 'react';
|
|
import classnames from 'classnames';
|
|
|
|
const WidgetDoc = ({ visible, label, body, html }) => (
|
|
<div className={classnames('widget', { widget_open: visible })}>
|
|
<h3>{label}</h3>
|
|
{body ? body : <div dangerouslySetInnerHTML={{ __html: html }} />}
|
|
</div>
|
|
);
|
|
|
|
export default WidgetDoc;
|