Skip to content

Commit

Permalink
Readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
sametweb committed Feb 14, 2021
1 parent 76dd687 commit efae024
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@
[![Build Status](https://travis-ci.com/sametweb/react-step-builder.svg?branch=master)](https://travis-ci.com/sametweb/react-step-builder) [![Coverage Status](https://coveralls.io/repos/github/sametweb/react-step-builder/badge.svg?branch=master)](https://coveralls.io/github/sametweb/react-step-builder?branch=master) [![Test Coverage](https://api.codeclimate.com/v1/badges/f0c62e4a8e4826eec6c9/test_coverage)](https://codeclimate.com/github/sametweb/react-step-builder/test_coverage) [![Maintainability](https://api.codeclimate.com/v1/badges/f0c62e4a8e4826eec6c9/maintainability)](https://codeclimate.com/github/sametweb/react-step-builder/maintainability) [![Total NPM Download](https://img.shields.io/npm/dt/react-step-builder.svg)](https://www.npmjs.com/package/react-step-builder)
<br/><br/>

## React Step Builder is a UI-agnostic multi step interface builder.
## A headless, type-safe, UI

<br/>

# Overview

React Step Builder provides;

- React / TypeScript support and type definitions
- A combined global state collected from- and persistent across each individual step component
- UI-agnostic functionality for navigating between step components
- Ready-to-use form handling methods for handling React form elements
- Easy to use API
- TypeScript support
- A global state
- Headless structure
- Out-of-box form handler methods

<br />

Expand Down Expand Up @@ -130,18 +129,18 @@ The React component that is passed to each `Step` wrapper component will be inje

### `navigation`

| Property | Type | Description |
| --------------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `component` | `() => JSX.Element` | This component's `props` object is automatically populated with the `Steps` component's state (see: [NavigationComponentProps](#component-type-of-example-navigation-component)). |
| `location` (optional) | "`before`" or "`after`" | Location of the navigation component. |
| Property | Type | Description |
| --------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `component` | `() => JSX.Element` | This component's `props` object is automatically populated with the `Steps` component's state (see: [NavigationComponentProps](#component-type-of-example-navigation-component)). |
| `location` (optional) | "`before`" \|\| "`after`" | Location of the navigation component. |

<br />
<hr />
<br />

## Prop types of the step components for React / TypeScript

When developing your step components, you can utilize `StepComponentProps` type definition for your step component props.
When developing your step components, you can utilize `StepComponentProps` type for your step component props.

<br/>

Expand Down Expand Up @@ -171,7 +170,7 @@ const Step1 = (props: StepComponentProps) => {
export default Step1;
```

## Component Type of Example Navigation Component
## Example Navigation Component

If you'd like to add a persistent navigation component to be shown on every step, you may utilize `NavigationComponentProps` type for your custom `Navigation` component. Here is an example:

Expand Down
1 change: 1 addition & 0 deletions src/stepComponents/Step1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from "react";
import { StepComponentProps } from "../lib-ts";

const Step1 = (props: StepComponentProps) => {
console.log({ props });
return (
<div className="step">
First Name:{" "}
Expand Down

0 comments on commit efae024

Please sign in to comment.