mentorenwahl/frontend/src/layouts/main.rs
Dominic Grimm 8055a5e4db
Some checks failed
continuous-integration/drone/push Build is failing
Update
2023-01-17 06:56:19 +01:00

35 lines
815 B
Rust

use yew::prelude::*;
// use crate::components;
use crate::layouts;
#[derive(Properties, PartialEq)]
pub struct MainProps {
pub token: Option<String>,
#[prop_or_default]
pub children: Children,
}
pub struct Main;
impl Component for Main {
type Message = ();
type Properties = MainProps;
fn create(_ctx: &Context<Self>) -> Self {
Self
}
fn view(&self, ctx: &Context<Self>) -> Html {
html! {
<layouts::base::Base token={ctx.props().token.to_owned()}>
<div class={classes!("columns", "is-centered")}>
<main class={classes!("column", "is-four-fifths")}>
{ for ctx.props().children.iter() }
</main>
</div>
</layouts::base::Base>
}
}
}