2020-06-21 15:57:50 +00:00
|
|
|
use crate::{prelude::*, props::*, render};
|
2020-06-18 13:53:25 +00:00
|
|
|
use yew::prelude::*;
|
|
|
|
|
|
|
|
pub struct FormGroup {
|
|
|
|
pub props: Props,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Component for FormGroup {
|
|
|
|
type Message = ();
|
|
|
|
type Properties = Props;
|
|
|
|
|
|
|
|
fn create(props: Self::Properties, _: ComponentLink<Self>) -> Self {
|
|
|
|
Self { props }
|
|
|
|
}
|
|
|
|
|
|
|
|
fn update(&mut self, _: Self::Message) -> ShouldRender {
|
|
|
|
false
|
|
|
|
}
|
|
|
|
|
|
|
|
fn change(&mut self, props: Self::Properties) -> ShouldRender {
|
2020-10-18 17:19:48 +00:00
|
|
|
render_if_ne(&mut self.props, props)
|
2020-06-18 13:53:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn view(&self) -> Html {
|
2020-06-21 15:57:50 +00:00
|
|
|
render::render_with_prefix(&self.props, "form-group", render::div(&self.props.children))
|
2020-06-18 13:53:25 +00:00
|
|
|
}
|
|
|
|
}
|