From 4c55ad8c644f32fd4463a69a96ebf107d0c36120 Mon Sep 17 00:00:00 2001 From: Tom Southall Date: Tue, 15 Mar 2022 12:42:30 +0000 Subject: [PATCH] Pass the highlighted state to custom Item component --- README.md | 5 ++++- src/lib/components/item.jsx | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ba1e0e1..341fd05 100644 --- a/README.md +++ b/README.md @@ -477,7 +477,9 @@ in order to exit the focused state of the search box. - `containerFocus`** Note that `container` and `containerFocus` are mutually exclusive. Only one or the other applies depending on whether the search box `` has focus. If the styling of the outer container is to change when the search box receives focus, specify styles for `containerFocus`. If nothing is specified for `containerFocus` the styles for `container` are applied whether or not the search box has focus. - **`input`** Applies to the search box `` element as well as the typeahead ``. As the typeahead is positioned directly beneath the search box, these must be styled almost identically. - **`inputFocus`** Applies to the search box `` element as well as the typeahead ``, only when the search box has focus. Note that `input` and `inputFocus` are mutually exclusive. Only one or the other applies depending on whether the search box `` has focus. If nothing is specified for `inputFocus` the styles for `input` are applied whether or not the search box has focus. - - **`query`** For styles applying *only* to the search box `` element and *not* the typeahead element beneath. A valid example is example text colour. Note that this element already has the following styles applied which cannot be overridden: `position: relative; z-index: 1; background-color: transparent;`. + - **`query`** For styles applying *only* to the search box `` element and *not* the typeahead element beneath. A valid example is example text colour. Note that this element already has the following styles applied which cannot be overridden: + - When typeahead is visible `position: relative; z-index: 1; background-color: transparent;` + - When typeahead is not visible `position: relative;` - **`typeahead`** For styles applying *only* to the typeahead `` element and *not* the search box element above. A valid example is example text colour. Note that this element already has the following styles applied which cannot be overridden: `position: absolute; z-index: 0; top: 0; left: 0;`. - **`cancelButton`** A `