import React from 'react'
import ReactDOM from 'react-dom'
import { cx, css } from '@emotion/css'
export const Button = React.forwardRef(
({ className, active, reversed, ...props }, ref) => (
)
)
export const EditorValue = React.forwardRef(
({ className, value, ...props }, ref) => {
const textLines = value.document.nodes
.map(node => node.text)
.toArray()
.join('\n')
return (
Slate's value as text
{textLines}
)
}
)
export const Icon = React.forwardRef(({ className, ...props }, ref) => (
))
export const Instruction = React.forwardRef(({ className, ...props }, ref) => (
))
export const Menu = React.forwardRef(({ className, ...props }, ref) => (
* {
display: inline-block;
}
& > * + * {
margin-left: 15px;
}
`
)}
/>
))
export const Portal = ({ children }) => {
return typeof document === 'object'
? ReactDOM.createPortal(children, document.body)
: null
}
export const Toolbar = React.forwardRef(({ className, ...props }, ref) => (
))