chore: change current machine
This commit is contained in:
1 parent
6e462754c1
commit
07ae69c8ae
10 files changed
+1332
-96
No files matched your search
@@ -2,17 +2,15 @@
|
||||
|
||||
#[component]
|
||||
pub fn ActionButton(
|
||||
#[prop(optional, default = String::from("button"))]
|
||||
button_type: String,
|
||||
#[prop(optional, default = RwSignal::new(false))]
|
||||
disabled: RwSignal<bool>,
|
||||
#[prop(optional, default = String::from("button"))] button_type: String,
|
||||
#[prop(optional, default = RwSignal::new(false))] disabled: RwSignal<bool>,
|
||||
children: Children,
|
||||
) -> impl IntoView {
|
||||
view! {
|
||||
<button
|
||||
class="m-3 p-3 rounded-lg text-white"
|
||||
class="m-1.5 p-2 rounded-lg text-white transition-all duration-400"
|
||||
class=(["bg-red-700", "hover:bg-red-800"], move || !disabled.get())
|
||||
class=("bg-gray-600", move || disabled.get())
|
||||
class=(["bg-gray-600", "pointer-events-none"], move || disabled.get())
|
||||
r#type=button_type
|
||||
disabled=move || disabled.get()
|
||||
>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
mod action_button;
|
||||
mod text_field;
|
||||
|
||||
pub use self::{
|
||||
action_button::ActionButton,
|
||||
text_field::OutlinedTextField
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
use leptos::prelude::*;
|
||||
|
||||
#[component]
|
||||
pub fn OutlinedTextField(
|
||||
#[prop(default = String::from(""))] placeholder: String,
|
||||
#[prop(default = RwSignal::new("".to_string()))] value: RwSignal<String>,
|
||||
#[prop(default = RwSignal::new(false))] disabled: RwSignal<bool>
|
||||
) -> impl IntoView {
|
||||
view! (
|
||||
<input
|
||||
class="flex-row border-2 m-1.5 p-1.5 rounded-md bg-transparent mt-6 relative transition-all duration-400"
|
||||
class=(["border-red-700"], move || !disabled.get())
|
||||
class=(["border-gray-600", "pointer-events-none"], move || disabled.get())
|
||||
r#type="text"
|
||||
disabled={disabled.get()}
|
||||
placeholder={placeholder}
|
||||
prop:value=value
|
||||
/>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user