1.0.5 • Published 2 years ago
dsg-components v1.0.5
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
key | default | type | notes |
---|---|---|---|
postUrl | "" | string (required) | Where should the data be posted? |
carList | [] | array (required) | Car data shown on the first step of the form? |
afterPost | null | function(formValues) | What to do after form is posted. Form values are passed to function. |
siteId | "" | string | The sites id (eg. "DAA"). |
Publish Instructions
npm version patch
(patch, major, or minor) OR manually update inpackage.json
(preferred method asnpm version
auto commits)npm run build
- Commit changes
npm publish
- Update repos that use this package if needed.