post-order-charge-component
v0.0.1
Published
Custom reusable element made for F1Portal
Downloads
6
Readme
Post Order Charge Component
Post Order Charge Component is custom ReactJs Component created for Sterling Talent Solutions F1Portal.
Features!
- Fully customizable and includes callback functions
- Can be included in both Aurelia and ReactJs
- Lightweight and reusable
Tech
Post Order Charge Component uses below mentioned Libraries/Frameworks to work properly:
Installation
Post Order Charge Component requires Node.js to run.
$ npm i post-order-charge-component -s
Import Component in required file using below line
import PostOrderChargeComponent from 'post-order-charge-component';
Render the function and pass props to it as per your requirement
<PostOrderChargeComponent />
Prop Types and their default values
Post Order Charge component has several prop types along with their default values
| Props Variable (Type) (Required) | Default Value | | ------ | ------ | | titleTxt (string) (Optional) | Post-Order Charge | | aureliaInstance (object) (Conditional) | NA | | calledFromAurelia (boolean) (Optional) | false | | partialView (boolean) (Optional) | false | | additionalChargeTxt (string) (Optional) | View Additional Charges | | chargeTypes (array) (Yes) | NA | | currencyTypes (array) (Yes) | NA | | standardChargePlaceholderTxt (string) (Optional) | $00.00 | | standardChargeLabelTxt (string) (Optional) | Standard Charge | | noteLabelTxt (string) (Optional) | Note (optional) | | clearChargeTxt (string) (Optional) | Clear Charge | | saveChargeTxt (string) (Optional) | Save Charge |
*NA - Not Applicable *Conditional - Required only if certain conditions are matched
Callbacks
Post Order Charge Component provides below mentioned callback functions as proptypes which will be called on execution of their respective events:
- saveCallback - callback function will be called when form is submitted
- saveUnbindedDataCallback - callback will be called every time data is modified in form inputs
- showPostOrderChargesCallback - callback function will be called whenever additionalChargeTxt link will be clicked