Types

Author

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

Brick

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

Bricks

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

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[]
createdAt: string
publishedAt?: string
}

PageFromList

type PageFromList = Omit<Page, 'content'>

PageFromListWithPagination

export type PagesFromListWithPagination = {
items: PageFromList[]
pagination: {
page: number
pageSize: number
totalItems: number
totalPages: number
}
}

Props

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

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