Move star out of editor into documentpreview (#174)

* Move star out of editor into documentpreview

* 💚
This commit is contained in:
Tom Moor
2017-08-02 20:45:09 -07:00
committed by GitHub
parent 09b0f9f860
commit ca35cee841
7 changed files with 61 additions and 70 deletions

View File

@ -9,12 +9,7 @@ import Paragraph from './components/Paragraph';
import type { Props, Node, Transform } from './types';
import styles from './Editor.scss';
type Options = {
onStar: Function,
onUnstar: Function,
};
const createSchema = ({ onStar, onUnstar }: Options) => {
const createSchema = () => {
return {
marks: {
bold: (props: Props) => <strong>{props.children}</strong>,
@ -44,9 +39,7 @@ const createSchema = ({ onStar, onUnstar }: Options) => {
image: Image,
link: Link,
'list-item': ListItem,
heading1: (props: Props) => (
<Heading placeholder onStar={onStar} onUnstar={onUnstar} {...props} />
),
heading1: (props: Props) => <Heading placeholder {...props} />,
heading2: (props: Props) => <Heading component="h2" {...props} />,
heading3: (props: Props) => <Heading component="h3" {...props} />,
heading4: (props: Props) => <Heading component="h4" {...props} />,