use topcoat::Result;
use topcoat::view::Attributes;
use topcoat::view::View;
use topcoat::view::class;
use topcoat::view::component;
use topcoat::view::view;
const TEXTAREA: &str = "field-sizing-content min-h-16 w-full rounded-lg border border-border \
bg-background px-3 py-2 text-sm shadow-xs transition-colors outline-none \
placeholder:text-muted-foreground \
focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 \
focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50";
#[component]
pub async fn textarea(#[default] mut attrs: Attributes, #[default] child: View) -> Result {
view! {
<textarea class=(class!(TEXTAREA, attrs.remove("class"))) (attrs)>
(child)
</textarea>
}
}