import React from 'react';
import Block from './Block';
import styles from '../MarkdownControl.css';
/* eslint react/prop-types: 0, react/no-multi-comp: 0 */
// Define the default node type.
export const DEFAULT_NODE = 'paragraph';
// Local node renderers.
export const NODES = {
'blockquote': (props) => {props.children},
'unordered_list': props => ,
'header_one': props => {props.children},
'header_two': props => {props.children},
'header_three': props => {props.children},
'header_four': props => {props.children},
'header_five': props => {props.children},
'header_six': props => {props.children},
'list_item': props =>
{props.children},
'paragraph': props => {props.children},
'hr': props => {
const { node, state } = props;
const isFocused = state.selection.hasEdgeIn(node);
const className = isFocused ? styles.active : null;
return (
);
},
'link': (props) => {
const { data } = props.node;
const href = data.get('href');
return {props.children};
},
'image': (props) => {
const { node, state } = props;
const isFocused = state.selection.hasEdgeIn(node);
const className = isFocused ? styles.active : null;
const src = node.data.get('src');
return (
);
}
};
// Local mark renderers.
export const MARKS = {
BOLD: {
fontWeight: 'bold'
},
ITALIC: {
fontStyle: 'italic'
},
CODE: {
fontFamily: 'monospace',
backgroundColor: '#eee',
padding: '3px',
borderRadius: '4px'
}
};