Types

Brick

type Brick<T = {}> = React.FC<T> & { schema: IBlockType }

Bricks

type Bricks = { [key: string]: Brick<any> }

User

type User = {
id: string
email: string
firstName: string
lastName: string
company: string
avatarUrl?: string
isAdmin: boolean
token: string
appName: string
deployHookUrl?: string
deployHookMethod: string
canCreatePage: boolean
canDeletePage: boolean
canDeploy: boolean
role: string
} | null

Page

type Page = {
id: string
type: string
name: string
slug: string
meta: IMeta
content: IContentBlock[]
authorId?: string
author: Author
invalidBlocksTypes?: string[]
status: PageStatus
isLocked: boolean
tags: string[]
}

Author

type Author = {
id: string
email: string
firstName: string
lastName: string
avatarUrl?: string
company?: string
}

PageFromList

type PageFromList = Omit<Page, 'content'>

RenderLocalLink

type RenderLocalLink = ({
href,
target,
className,
activeClassName,
isAdmin,
children,
}: {
href: string
target?: string
className?: string
activeClassName?: string
isAdmin?: boolean
children: React.ReactNode
}) => React.ReactElement

TextValue

import { Value } from 'slate'
type TextValue = Value

Props

type Props = { [key: string]: any }