@ideal-postcodes/address-finder
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -0,1 +1,8 @@ | ||
# [2.1.0](https://github.com/ideal-postcodes/address-finder/compare/2.0.0...2.1.0) (2021-06-23) | ||
### Features | ||
* **Styling:** Expose config for styling of suggestions ([0ab038b](https://github.com/ideal-postcodes/address-finder/commit/0ab038bdbb1311ab2b71493fd8cf8bd9e5b6b7db)) | ||
# [2.0.0](https://github.com/ideal-postcodes/address-finder/compare/1.8.4...2.0.0) (2021-06-10) | ||
@@ -2,0 +9,0 @@ |
@@ -54,2 +54,3 @@ "use strict"; | ||
listStyle: {}, | ||
liStyle: {}, | ||
containerStyle: {}, | ||
@@ -56,0 +57,0 @@ // Hide / unhide |
@@ -130,2 +130,3 @@ "use strict"; | ||
li.setAttribute("role", "option"); | ||
jsutil_1.setStyle(li, view.options.liStyle); | ||
li.id = `${id}_${i}`; | ||
@@ -132,0 +133,0 @@ view.list.appendChild(li); |
@@ -248,2 +248,20 @@ /** | ||
/** | ||
* Applies additional styling to the the Address Finder list element. Accepts CSSStyleDeclaration object | ||
* | ||
* @default | ||
* | ||
* `{}` | ||
* | ||
* @example | ||
* | ||
* ```javascript | ||
* { | ||
* liStyle: { | ||
* backgroundColor: "#000", | ||
* }, | ||
* } | ||
* ``` | ||
*/ | ||
liStyle: CSSStyle; | ||
/** | ||
* Hide a list of HTML elements when Postcode Lookup is instantiated | ||
@@ -250,0 +268,0 @@ * |
@@ -47,2 +47,3 @@ /** | ||
listStyle: {}, | ||
liStyle: {}, | ||
containerStyle: {}, | ||
@@ -49,0 +50,0 @@ // Hide / unhide |
import { createMachine, interpret, assign } from "@xstate/fsm"; | ||
import { update, hide, show } from "@ideal-postcodes/jsutil"; | ||
import { update, hide, show, setStyle } from "@ideal-postcodes/jsutil"; | ||
/** | ||
@@ -127,2 +127,3 @@ * @hidden | ||
li.setAttribute("role", "option"); | ||
setStyle(li, view.options.liStyle); | ||
li.id = `${id}_${i}`; | ||
@@ -129,0 +130,0 @@ view.list.appendChild(li); |
@@ -248,2 +248,20 @@ /** | ||
/** | ||
* Applies additional styling to the the Address Finder list element. Accepts CSSStyleDeclaration object | ||
* | ||
* @default | ||
* | ||
* `{}` | ||
* | ||
* @example | ||
* | ||
* ```javascript | ||
* { | ||
* liStyle: { | ||
* backgroundColor: "#000", | ||
* }, | ||
* } | ||
* ``` | ||
*/ | ||
liStyle: CSSStyle; | ||
/** | ||
* Hide a list of HTML elements when Postcode Lookup is instantiated | ||
@@ -250,0 +268,0 @@ * |
{ | ||
"name": "@ideal-postcodes/address-finder", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Address Finder JS library backed by the Ideal Postcodes UK address search API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
170278
4558