1.0.0 • Published 4 years ago

@trevianxyz/messagecenter-ui v1.0.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
4 years ago

MessageCenter UI

NodeJS Package

This library comprises the modular form interface used to construct MessageCenter forms. It provides a modular data structure that can easily be adapted and implemented by other packages, and make use of a centralized plugin library to extend its functionality.

Installation

npm install git+ssh://git@github.com:trevianxyz/MessageCenter-UI

Usage

<Form
  editable={isEditable}
  inputs={[ ...inputs ]}
  onDataChange={(form, data) => { ... }}
  onEdit={(form, input) => { ... }} />

Creating Inputs

Input modules must export a const type object that implements the InputType interface. This specifies various details about the type of input, as well as a React component class to render.

React input components should extend the Input class, which supplies various utility methods and allows the input to behave as declared in its type object. It also provides an interface for editing parameters used by the input if the supplied "editable" param is true.

Development

This project should be developed on Node v12.13.0. pnpm is preferred, but should be interoperable with npm for most things.

CommandDescription
make testInstalls dependencies and runs any project test files.
make serveStarts a webpack server for development.
make buildCompiles the library into the dist/ directory for distribution.
make build-devCompiles the library with type checking.
make cleanRemoves build files.