1.0.5 • Published 2 years ago

dsg-components v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

dsg-components

List of React forms and components for DSG and Cactus use.

Installation

npm install @dsgautonpm/dsg-components -S

Usage

import { DsgWizard } from '@dsgautonpm/dsg-components';

<DsgWizard
  postUrl="https://www.where-should-i-post-this.com/api/route"
  carList={[
    {
      name: "Sedan",
      value: "sedan",
      content: <img src="sedan.png" />
    },
    {
      name: "SUV",
      value: "suv",
      content: <img src="suv.png" />
    },
  ]}
  afterPost={() => console.log('ITS POSTED!!')}
/>}

Props

DsgWizard

keydefaulttypenotes
postUrl""string (required)Where should the data be posted?
carList[]array (required)Car data shown on the first step of the form?
afterPostnullfunction(formValues)What to do after form is posted. Form values are passed to function.
siteId""stringThe sites id (eg. "DAA").

Publish Instructions

  1. npm version patch (patch, major, or minor) OR manually update in package.json (preferred method as npm version auto commits)
  2. npm run build
  3. Commit changes
  4. npm publish
  5. Update repos that use this package if needed.