iros-vehicle-lookup
v0.0.3
Published
Vehicle look up
Downloads
19
Readme
Project Title
Vehicle look up
Installattion
npm link/install iros-vehicle-lookup
Usage
import VehicleLookup from 'iros-vehicle-lookup'
class Example extends Component {
handleOnDataUpdate = (data) =>{
console.log("data from Vehicle Lookup:", data);
//update you vehicle info
//data structure:
/*
let data= {
parmas: null || object,
model: '',
make: '',
year: '',
seats: '',
bodyType: '',
abi: '',
};
*/
}
render(){
return(
<VehicleLookup url='example.com' apiKey='key' params={params1: 'data'} onDataUpdate = {handleOnDataUpdate/>
)
}
};
Props
| Prop | Type | Required | Description | | :--- | :--- | :---: | :--- | | url| String | ✓ | url base to make the request| | apiKey| String | | x-api-key| | params| Object | | useful to share info between components | | onDataUpdate | Function | ✓ | return de vehicle data| | debug | Bool | | show the formik state|