use crate::prelude::*;
pub struct Card;
impl Card {
pub fn new(cx: &mut Context, content: impl FnOnce(&mut Context)) -> Handle<Self> {
Self.build(cx, content)
}
}
impl View for Card {
fn element(&self) -> Option<&'static str> {
Some("card")
}
}
pub struct CardHeader;
impl CardHeader {
pub fn new(cx: &mut Context, content: impl FnOnce(&mut Context)) -> Handle<Self> {
Self.build(cx, content)
}
}
impl View for CardHeader {
fn element(&self) -> Option<&'static str> {
Some("card-header")
}
}
pub struct CardContent;
impl CardContent {
pub fn new(cx: &mut Context, content: impl FnOnce(&mut Context)) -> Handle<Self> {
Self.build(cx, content)
}
}
impl View for CardContent {
fn element(&self) -> Option<&'static str> {
Some("card-content")
}
}
pub struct CardFooter;
impl CardFooter {
pub fn new(cx: &mut Context, content: impl FnOnce(&mut Context)) -> Handle<Self> {
Self.build(cx, content)
}
}
impl View for CardFooter {
fn element(&self) -> Option<&'static str> {
Some("card-footer")
}
}