-
Notifications
You must be signed in to change notification settings - Fork 513
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(examples): use htm in examples templates (#6046)
- Loading branch information
1 parent
a047839
commit 5edf56b
Showing
32 changed files
with
755 additions
and
471 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
export const collapseButtonText = ({ collapsed }: { collapsed: boolean }) => | ||
collapsed | ||
? ` | ||
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13"> | ||
<path fill="#21243d" d="M6 6V0h1v6h6v1H7v6H6V7H0V6h6z" fill-rule="evenodd"/> | ||
</svg> | ||
` | ||
: ` | ||
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13"> | ||
<path fill="#21243d" d="M0 6h13v1H0z" fill-rule="evenodd"/> | ||
</svg> | ||
`; | ||
import { refinementList } from 'instantsearch.js/es/widgets'; | ||
import { PanelTemplates } from 'instantsearch.js/es/widgets/panel/panel'; | ||
|
||
export const collapseButtonText: PanelTemplates< | ||
typeof refinementList | ||
>['collapseButtonText'] = ({ collapsed }, { html }) => { | ||
if (collapsed) { | ||
return html`<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13"> | ||
<path | ||
fill="#21243d" | ||
d="M6 6V0h1v6h6v1H7v6H6V7H0V6h6z" | ||
fill-rule="evenodd" | ||
/> | ||
</svg>`; | ||
} | ||
|
||
return html`<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13"> | ||
<path fill="#21243d" d="M0 6h13v1H0z" fill-rule="evenodd" /> | ||
</svg>`; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.