1use crate::prelude::*;
2
3pub struct Card;
5
6impl Card {
7 pub fn new(cx: &mut Context, content: impl FnOnce(&mut Context)) -> Handle<Self> {
9 Self.build(cx, content)
10 }
11}
12
13impl View for Card {
14 fn element(&self) -> Option<&'static str> {
15 Some("card")
16 }
17}
18
19pub struct CardHeader;
21
22impl CardHeader {
23 pub fn new(cx: &mut Context, content: impl FnOnce(&mut Context)) -> Handle<Self> {
25 Self.build(cx, content)
26 }
27}
28
29impl View for CardHeader {
30 fn element(&self) -> Option<&'static str> {
31 Some("card-header")
32 }
33}
34
35pub struct CardContent;
37
38impl CardContent {
39 pub fn new(cx: &mut Context, content: impl FnOnce(&mut Context)) -> Handle<Self> {
41 Self.build(cx, content)
42 }
43}
44
45impl View for CardContent {
46 fn element(&self) -> Option<&'static str> {
47 Some("card-content")
48 }
49}
50
51pub struct CardFooter;
53
54impl CardFooter {
55 pub fn new(cx: &mut Context, content: impl FnOnce(&mut Context)) -> Handle<Self> {
57 Self.build(cx, content)
58 }
59}
60
61impl View for CardFooter {
62 fn element(&self) -> Option<&'static str> {
63 Some("card-footer")
64 }
65}