add clear search button

This commit is contained in:
Hubert Van De Walle 2020-08-21 20:21:47 +02:00
parent d575773f73
commit 381d935875

View File

@ -18,16 +18,19 @@ fun DIV.noteListHeader(numberOfDeletedNotes: Int, query: String = "") {
) { +"New" } ) { +"New" }
} }
} }
form(method = post, classes = "mb-4") { form(method = post, classes = "mb-4 flex space-x-2") {
val colors = "bg-gray-800 border-gray-700 focus:border-teal-500 text-white" val colors = "bg-gray-800 border-gray-700 focus:border-teal-500 text-white"
input( input(
name = "search", name = "search",
classes = "$colors rounded w-3/4 border appearance-none focus:outline-none text-base p-2" classes = "$colors rounded w-2/3 border appearance-none focus:outline-none text-base flex-1 p-2"
) { ) {
attributes["value"] = query attributes["value"] = query
} }
button(type = submit, classes = "btn btn-green w-1/4") { button(type = submit, classes = "btn btn-green") {
+"search" +"search"
} }
a(href = "/notes", classes = "btn btn-red inline-block text-center") {
+"clear"
}
} }
} }