/* eslint-disable react/display-name */
import React from 'react';
import { css } from '@emotion/core';
import styled from '@emotion/styled';
import { colors, lengths } from 'netlify-cms-ui-default';
import VoidBlock from './components/VoidBlock';
import Shortcode from './components/Shortcode';
const bottomMargin = '16px';
const headerStyles = `
font-weight: 700;
line-height: 1;
`;
const StyledH1 = styled.h1`
${headerStyles};
font-size: 32px;
margin-top: 16px;
`;
const StyledH2 = styled.h2`
${headerStyles};
font-size: 24px;
margin-top: 12px;
`;
const StyledH3 = styled.h3`
${headerStyles};
font-size: 20px;
`;
const StyledH4 = styled.h4`
${headerStyles};
font-size: 18px;
margin-top: 8px;
`;
const StyledH5 = styled.h5`
${headerStyles};
font-size: 16px;
margin-top: 8px;
`;
const StyledH6 = StyledH5.withComponent('h6');
const StyledP = styled.p`
margin-bottom: ${bottomMargin};
`;
const StyledBlockQuote = styled.blockquote`
padding-left: 16px;
border-left: 3px solid ${colors.background};
margin-left: 0;
margin-right: 0;
margin-bottom: ${bottomMargin};
`;
const StyledPre = styled.pre`
margin-bottom: ${bottomMargin};
white-space: pre-wrap;
& > code {
display: block;
width: 100%;
overflow-y: auto;
background-color: #000;
color: #ccc;
border-radius: ${lengths.borderRadius};
padding: 10px;
}
`;
const StyledCode = styled.code`
background-color: ${colors.background};
border-radius: ${lengths.borderRadius};
padding: 0 2px;
font-size: 85%;
`;
const StyledUl = styled.ul`
margin-bottom: ${bottomMargin};
padding-left: 30px;
`;
const StyledOl = StyledUl.withComponent('ol');
const StyledLi = styled.li`
& > p:first-child {
margin-top: 8px;
}
& > p:last-child {
margin-bottom: 8px;
}
`;
const StyledA = styled.a`
text-decoration: underline;
font-size: inherit;
`;
const StyledHr = styled.hr`
border: 1px solid;
margin-bottom: 16px;
`;
const StyledTable = styled.table`
border-collapse: collapse;
`;
const StyledTd = styled.td`
border: 2px solid black;
padding: 8px;
text-align: left;
`;
/**
* Slate uses React components to render each type of node that it receives.
* This is the closest thing Slate has to a schema definition. The types are set
* by us when we manually deserialize from Remark's MDAST to Slate's AST.
*/
/**
* Mark Components
*/
function Bold(props) {
return {props.children};
}
function Italic(props) {
return {props.children};
}
function Strikethrough(props) {
return {props.children};
}
function Code(props) {
return
;
}
};
}
export function renderInline() {
return props => {
switch (props.node.type) {
case 'link':
return ;
case 'image':
return ; case 'code-block': if (codeBlockComponent) { return (