1.0.0 • Published 8 months ago

ngvx-stepper v1.0.0

Weekly downloads
-
License
-
Repository
github
Last release
8 months ago

Stepper

This library was generated with Angular CLI version 16.2.0.

This library is created for stpper form with steps.

This Provide a steps with next previous and submit functionality.

How to use

- import StepperModule from stepper.
  • use <ui-stepper> component as wrapper of steps

component.html

	<ui-stepper [customStyle]="myStyle">
	</ui-stepper>

component.ts

import { CountWidgetStyles } from 'stepper';
export class {
    public myStyle:CountWidgetStyles = {
        colors: {
                default:  '#008dff',	
                background:  '#e9ecef',	
                active:  '#3bcb44',
                activeBg:  '#e9ecef',
                completed:  '#ffffff',
                completedBg:  '#008DFF'
                },
        shape:  'circle',
        orientation:  'horizontal'
        }
    }
}
NameTypeDescription
defaultstringdefault color of step
backgroundstringdefault background color of step
activestringactive state step color
activeBgstringactive state background step color
compltedstringcompleted state step color
completedBgstringcompleted state step background color
shapeShape : circle ,squareshape of step
orientationOrientation : horizontal , verticalorientation
  • use <ui-step> selector for your content as wrapper.
<ui-stepper [customStyle]="myStyle">
    <ui-step countTitle="Basic Details">
        <header> <h3>Write your title e.g.Basic Details </h3></header>
        <app-your-form-selecter #formSelector></app-your-form-selecter>
    </ui-step>
</ui-stpper>

Note - Please use #formSelector on form slector component

  • Implement StpperForm Interface in yout form componet that you are using as slector.

app-your-form.ts

import { StepperForm } from 'stepper'
export class AppYourForm implements StepperForm    {
    public submitForm():void {
    //trigger this when next, previous or submit click
    }
    public getFormData:FormGroup<any> {
    //your from group instance 
        return this.myFrom
    }
}
1.0.0

8 months ago