Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StaticComponent<ComponentType, DBSchema>

A component along with the associated properties needed to render it as part of a StepDefinition.

If you need your component to interact with a Database, use a DynamicComponent instead.

const myInput = new Component({
  key: "my-input",
  Component: MyInput,
  props: {
    className: "my-input-class"
  }
});

Type parameters

Hierarchy

  • StaticComponent

Index

Constructors

Properties

Constructors

constructor

Properties

Component

Component: ComponentType

key

key: string

props

props: ComponentType extends React.ElementType<infer Props> ? Props : {}

renderWhen

renderWhen: (stepValues: {}) => boolean

Type declaration

    • (stepValues: {}): boolean
    • Parameters

      Returns boolean

Static propType

propType: Requireable<StaticComponent<React.ElementType, NamedSchema<string, number, Schema>>> = PropTypes.exact({key: PropTypes.string.isRequired,Component: (PropTypes.elementType as PropTypes.Requireable<React.ElementType>).isRequired,props: PropTypes.object.isRequired,renderWhen: PropTypes.func.isRequired,})

The proptype validator for a StaticComponent.

Generated using TypeDoc