Title - Simple

Description

View Repository
View on NPM

Example

This is an interactive example of the Simple title.

Section One

In this section you will be asked questions about control structures.

Imports

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

Usage

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

const My = () => (
  <TitleShell
    onNext={async () => {}}
    TitleComponent={Title}
    title={input}
  />
);
            
You can also use this title with the Do component.

JSON Schema

If you do not want to use the provided forms to create an title 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"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "title",
        "message"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "name",
    "description",
    "subtype",
    "view"
  ],
  "additionalProperties": false
}