yew_components_library/molecules/big_text_field/
mod.rs1use yew::{function_component, html, Html};
2
3mod props;
4use props::Props;
5
6use crate::atoms::*;
7
8#[function_component]
9pub fn BigTextField(props: &Props) -> Html {
10 let Props {
11 label,
12 title,
13 place_holder,
14 required,
15 } = props;
16 html! {
17 <div>
18 <label for={label.to_owned()} class="block mb-2 text-sm font-medium text-background-on-light dark:text-background-on-dark">{title}</label>
19 <input type="text" id={label.to_owned()}
20 class="block p-2 pb-16 w-full text-sm rounded-lg border bg-tertiary-light border-outline-light text-tertiary-on-light focus:ring-tertiary-light focus:border-tertiary-light dark:bg-tertiary-dark dark:border-outline-dark dark:text-tertiary-on-dark dark:focus:ring-tertiary-dark dark:focus:border-tertiary-dark"
21 placeholder={place_holder.to_owned()} required={required.to_owned()} />
22 </div>
23 }
24}