static-cms/src/components/Widgets/MarkdownControl.js

26 lines
621 B
JavaScript
Raw Normal View History

import React, { PropTypes } from 'react';
import VisualEditor from './MarkdownControlElements/VisualEditor';
2016-08-03 10:30:42 -03:00
2016-08-01 16:41:55 -03:00
class MarkdownControl extends React.Component {
2016-05-30 16:55:32 -07:00
render() {
const { onChange, onAddMedia, getMedia, value } = this.props;
2016-05-30 16:55:32 -07:00
return (
<VisualEditor
onChange={onChange}
onAddMedia={onAddMedia}
getMedia={getMedia}
value={value}
/>
2016-08-01 16:41:55 -03:00
);
2016-05-30 16:55:32 -07:00
}
}
2016-08-01 16:41:55 -03:00
export default MarkdownControl;
MarkdownControl.propTypes = {
onChange: PropTypes.func.isRequired,
2016-08-08 18:51:53 -03:00
onAddMedia: PropTypes.func.isRequired,
getMedia: PropTypes.func.isRequired,
value: PropTypes.node,
};