Skip to content

design and build blocks package #1

Description

@DexterStorey
import { createBlock } from '@rubriclab/blocks'
import { z } from 'zod'

export const blocks = {
	paragraph: createBlock({
		schema: {
			input: z.object({text: z.string()})
        },
		render: async ({ text }) => (
			<p>
				{text}
			</p>
		)
	})
}

More advanced blocks:

  • Table
  • Form

Consider carefully the integration with actions. Tables need to be rendered on the fly from complex return types. Forms need to be rendered on the fly from complex action inputs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions