2020-05-28 18:09:25 +00:00
|
|
|
use crate::prelude::*;
|
2020-06-03 19:33:25 +00:00
|
|
|
use yew::prelude::*;
|
2020-05-28 18:09:25 +00:00
|
|
|
|
|
|
|
pub struct Jumbotron {
|
|
|
|
props: Props,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Component for Jumbotron {
|
|
|
|
type Properties = Props;
|
|
|
|
type Message = ();
|
|
|
|
|
|
|
|
fn create(props: Self::Properties, _: ComponentLink<Self>) -> Self {
|
|
|
|
Self { props }
|
|
|
|
}
|
|
|
|
|
|
|
|
fn update(&mut self, _: Self::Message) -> ShouldRender {
|
|
|
|
false
|
|
|
|
}
|
|
|
|
|
|
|
|
fn change(&mut self, _: Self::Properties) -> ShouldRender {
|
|
|
|
false
|
|
|
|
}
|
|
|
|
|
|
|
|
fn view(&self) -> Html {
|
2020-06-03 19:33:25 +00:00
|
|
|
let class = calculate_classes("jumbotron", (&self.props).into());
|
2020-05-28 18:09:25 +00:00
|
|
|
html! {
|
2020-06-03 19:33:25 +00:00
|
|
|
<div class=class>
|
2020-05-28 18:09:25 +00:00
|
|
|
{ self.props.children.render() }
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|