af126c7feat: tailwind theme and the first components25d | 1 | use topcoat::{ |
| 2 | Result, |
| 3 | view::{Attributes, class, component, view}, |
| 4 | }; |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | const INPUT: &str = "h-9 w-full min-w-0 rounded-lg border border-border bg-background px-3 \ |
| 12 | text-sm shadow-xs transition-colors outline-none \ |
| 13 | placeholder:text-muted-foreground \ |
| 14 | file:mr-3 file:h-full file:border-0 file:bg-transparent file:text-sm file:font-medium \ |
| 15 | focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 \ |
| 16 | focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50"; |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | #[component] |
| 31 | pub async fn input(#[default] mut attrs: Attributes) -> Result { |
| 32 | view! { <input class=(class!(INPUT, attrs.remove("class"))) (attrs)> } |
| 33 | } |