Start - Simple

Description

View Repository
View on NPM

Example

This is an interactive example of the Simple start.

Welcome

This is an example. Feel free to use it as a template.

Imports

This is a list of all exported components and functions. These are only relevant if you want to use this start in a standalone way.
import {
  Start, StartSchema,
  ViewForm
} from "@bitflow/start-simple"

Usage

We recommand that you wrap this component with the StartShell component like so, if you want to use the component on its own.
import { StartShell } from "@bitflow/shell";
import { evaluate, Start } from "@bitflow/start-simple";

const My = () => (
  <StartShell
    onNext={async () => {}}
    StartComponent={Start}
    start={input}
  />
);
            
You can also use this start with the Do component.

JSON Schema

If you do not want to use the provided forms to create an start object, you can build something yourself which produces a object, which follows this JSON schema.
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "subtype": {
      "type": "string",
      "const": "simple"
    },
    "view": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "markdown": {
          "type": "string"
        }
      },
      "required": [
        "title",
        "markdown"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "name",
    "description",
    "subtype",
    "view"
  ],
  "additionalProperties": false
}