create another button style
This commit is contained in:
parent
9bf4d6124c
commit
9aeecc7dee
@ -6,7 +6,8 @@ pub enum ButtonStyle {
|
||||
Secondary,
|
||||
Success,
|
||||
Danger,
|
||||
Warning
|
||||
Warning,
|
||||
Cyberpunk
|
||||
}
|
||||
|
||||
#[component]
|
||||
@ -37,6 +38,9 @@ pub fn Button(
|
||||
},
|
||||
ButtonStyle::Warning => {
|
||||
stylestring = "bg-yellow-500 hover:bg-yellow-700 text-black font-semibold py-2 px-4 rounded";
|
||||
},
|
||||
ButtonStyle::Cyberpunk => {
|
||||
stylestring = "bg-[#0a0c1b] hover:bg-[#171d3a] text-white font-bold py-2 px-4 rounded shadow-lg transition duration-300 ease-in-out transform hover:scale-105";
|
||||
}
|
||||
}
|
||||
logging::log!("{}", stylestring);
|
||||
|
||||
@ -5,6 +5,7 @@ use leptos_router::{
|
||||
StaticSegment,
|
||||
};
|
||||
use leptos_components::components::buttons::Button;
|
||||
use leptos_components::components::buttons::ButtonStyle;
|
||||
|
||||
pub fn shell(options: LeptosOptions) -> impl IntoView {
|
||||
view! {
|
||||
@ -58,6 +59,6 @@ fn HomePage() -> impl IntoView {
|
||||
view! {
|
||||
<h1>"Welcome to Leptos!"</h1>
|
||||
<button on:click=on_click>"Click Me: " {move || count.get()}</button>
|
||||
<Button on:click=on_click>"Click Me: " {move || count.get()}</Button>
|
||||
<Button style=ButtonStyle::Cyberpunk on:click=on_click>"Click Me: " {move || count.get()}</Button>
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user