diff --git a/src/docs/03-combobox.md b/src/docs/03-combobox.md index 38c62fb..45a723d 100644 --- a/src/docs/03-combobox.md +++ b/src/docs/03-combobox.md @@ -86,17 +86,14 @@ Comboboxes are the foundation of accessible autocompletes and command palettes f > {#each filtered as value} {@const active = $combobox.active === value} - {@const selected = $combobox.selected === value}
  • - {value.name} - {#if selected} - - - - {/if} + {value.name} +
  • {:else}
  • diff --git a/src/docs/04-combobox-multi.md b/src/docs/04-combobox-multi.md index 061fd38..9232f62 100644 --- a/src/docs/04-combobox-multi.md +++ b/src/docs/04-combobox-multi.md @@ -101,17 +101,14 @@ Pass an array to the `selected` property of `createCombobox` to trigger multi-se > {#each filtered as value} {@const active = $combobox.active === value} - {@const selected = $combobox.selected.includes(value)}
  • - {value.name} - {#if selected} - - - - {/if} + {value.name} +
  • {:else}
  • diff --git a/src/docs/07-listbox.md b/src/docs/07-listbox.md index 5536756..fe5fb9c 100644 --- a/src/docs/07-listbox.md +++ b/src/docs/07-listbox.md @@ -73,18 +73,14 @@ Listboxes are a great foundation for building custom, accessible select menus fo class="absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" > {#each people as value, i} - {@const active = $listbox.active === value} - {@const selected = $listbox.selected === value}
  • - {value.name} - {#if selected} - - - - {/if} + {value.name} +
  • {/each} diff --git a/src/docs/08-listbox-multi.md b/src/docs/08-listbox-multi.md index 7d0e943..fd5df88 100644 --- a/src/docs/08-listbox-multi.md +++ b/src/docs/08-listbox-multi.md @@ -92,18 +92,14 @@ Pass an array to the `selected` property of `createListbox` to trigger multi-sel class="absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" > {#each people as value (value.id)} - {@const active = $listbox.active === value} - {@const selected = $listbox.selected.includes(value)}
  • - {value.name} - {#if selected} - - - - {/if} + {value.name} +
  • {/each} diff --git a/src/docs/09-menu.md b/src/docs/09-menu.md index f7303b5..e0c70a4 100644 --- a/src/docs/09-menu.md +++ b/src/docs/09-menu.md @@ -91,7 +91,7 @@ Menus offer an easy way to build custom, accessible dropdown components with rob {@const active = $menu.active === option.text}