Skip to content
Snippets Groups Projects
Commit 332a141b authored by marcantoinem's avatar marcantoinem
Browse files

Start transition to tailwind

parent 6371c778
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,7 @@ pub fn AutoComplete<F: FnMut(String) + Copy + Clone + 'static>( ...@@ -59,7 +59,7 @@ pub fn AutoComplete<F: FnMut(String) + Copy + Clone + 'static>(
view! { view! {
<div class="search-container ".to_owned() + &class> <div class="search-container ".to_owned() + &class>
<input type="text" class="search-bar" on:input=on_input placeholder=placeholder prop:value=input id=id on:keyup=move |ev| { <input type="text" class="py-2 px-3 block w-full border-gray-200 rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none" on:input=on_input placeholder=placeholder prop:value=input id=id on:keyup=move |ev| {
if ev.key() == "Enter" && is_ok.get() == "add-button" { if ev.key() == "Enter" && is_ok.get() == "add-button" {
let input = input.get().trim().to_uppercase(); let input = input.get().trim().to_uppercase();
submit(input); submit(input);
...@@ -70,7 +70,7 @@ pub fn AutoComplete<F: FnMut(String) + Copy + Clone + 'static>( ...@@ -70,7 +70,7 @@ pub fn AutoComplete<F: FnMut(String) + Copy + Clone + 'static>(
let input = input.get().trim().to_uppercase(); let input = input.get().trim().to_uppercase();
submit(input); submit(input);
}> }>
<PlusCircle size="2.5em"/> <PlusCircle size="2em"/>
</button> </button>
<div class="result-box"> <div class="result-box">
{suggestions.into_iter().enumerate().map(|(i, autocomplete)| view!{ {suggestions.into_iter().enumerate().map(|(i, autocomplete)| view!{
......
...@@ -7,12 +7,6 @@ ...@@ -7,12 +7,6 @@
display: none; display: none;
} }
.search-bar {
width: 100%;
box-sizing: border-box;
padding: 4pt;
}
input:focus~.result-box { input:focus~.result-box {
display: block; display: block;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment