bootstrap-rs/src/jumbotron.rs

33 lines
682 B
Rust
Raw Normal View History

2020-06-21 15:57:50 +00:00
use crate::{props::Props, render};
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-21 15:57:50 +00:00
let html = html! {
<div>
2020-07-22 20:50:09 +00:00
{ self.props.children.clone() }
2020-05-28 18:09:25 +00:00
</div>
2020-06-21 15:57:50 +00:00
};
render::render_with_prefix(&self.props, "jumbotron", html)
2020-05-28 18:09:25 +00:00
}
}