From 9ff9493f8e5feafa10cf6e1e62f16de307092f4f Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sun, 29 Sep 2024 21:44:08 +0300 Subject: [PATCH] :sparkles: feat: add clear button near the search bar input field (#394) --- src/templates/partials/bar.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/templates/partials/bar.rs b/src/templates/partials/bar.rs index ebf89fe..bf66c4c 100644 --- a/src/templates/partials/bar.rs +++ b/src/templates/partials/bar.rs @@ -16,6 +16,9 @@ pub fn bar(query: &str) -> Markup { html!( (PreEscaped("
")) input type="search" name="search-box" value=(query) placeholder="Type to search"; + button type="reset" onclick="clearSearchText()" { + img src="./images/close.svg" alt="Clear button icon for clearing search input text"; + } button type="submit" onclick="searchWeb()" { img src="./images/magnifying_glass.svg" alt="Info icon for error box"; }