|
| 1 | +use super::super::component::*; |
| 2 | +use crate::components::button::{Button, ButtonVariant}; |
| 3 | +use crate::components::input::Input; |
| 4 | +use crate::components::label::Label; |
| 5 | +use dioxus::prelude::*; |
| 6 | + |
| 7 | +#[component] |
| 8 | +pub fn Demo() -> Element { |
| 9 | + rsx! { |
| 10 | + Card { style: "width: 100%; max-width: 24rem;", |
| 11 | + CardHeader { |
| 12 | + CardTitle { "Login to your account" } |
| 13 | + CardDescription { "Enter your email below to login to your account" } |
| 14 | + CardAction { |
| 15 | + Button { variant: ButtonVariant::Ghost, "Sign Up" } |
| 16 | + } |
| 17 | + } |
| 18 | + CardContent { |
| 19 | + form { |
| 20 | + div { style: "display: flex; flex-direction: column; gap: 1.5rem;", |
| 21 | + div { style: "display: grid; gap: 0.5rem;", |
| 22 | + Label { html_for: "email", "Email" } |
| 23 | + Input { |
| 24 | + id: "email", |
| 25 | + r#type: "email", |
| 26 | + |
| 27 | + } |
| 28 | + } |
| 29 | + div { style: "display: grid; gap: 0.5rem;", |
| 30 | + div { style: "display: flex; align-items: center;", |
| 31 | + Label { html_for: "password", "Password" } |
| 32 | + a { |
| 33 | + href: "#", |
| 34 | + style: "margin-left: auto; font-size: 0.875rem; color: var(--secondary-color-5); text-decoration: underline; text-underline-offset: 4px;", |
| 35 | + "Forgot your password?" |
| 36 | + } |
| 37 | + } |
| 38 | + Input { id: "password", r#type: "password" } |
| 39 | + } |
| 40 | + } |
| 41 | + } |
| 42 | + } |
| 43 | + CardFooter { style: "flex-direction: column; gap: 0.5rem;", |
| 44 | + Button { r#type: "submit", style: "width: 100%;", "Login" } |
| 45 | + Button { variant: ButtonVariant::Outline, style: "width: 100%;", "Login with Google" } |
| 46 | + } |
| 47 | + } |
| 48 | + } |
| 49 | +} |
0 commit comments