Skip to main content

zu/grid/
mod.rs

1// Copyright (c) 2024 Xu Shaohua <shaohua@biofan.org>. All rights reserved.
2// Use of this source is governed by Lesser General Public License
3// that can be found in the LICENSE file.
4
5mod column;
6
7use yew::{function_component, html, AttrValue, Children, Classes, Html, Properties};
8
9use crate::styles::flex_direction::FlexDirection;
10use crate::styles::flex_wrap::FlexWrap;
11pub use column::Column;
12
13#[derive(Debug, Clone, PartialEq, Properties)]
14pub struct Props {
15    #[prop_or_default]
16    pub children: Children,
17
18    #[prop_or_default]
19    pub classes: Classes,
20
21    #[prop_or(12)]
22    pub columns: i32,
23
24    #[prop_or_default]
25    pub column_spacing: Option<i32>,
26
27    #[prop_or_default]
28    pub component: AttrValue,
29
30    #[prop_or(false)]
31    pub container: bool,
32
33    #[prop_or(FlexDirection::Row)]
34    pub direction: FlexDirection,
35
36    #[prop_or(false)]
37    pub item: bool,
38
39    #[prop_or_default]
40    pub lg: Column,
41
42    #[prop_or_default]
43    pub md: Column,
44
45    #[prop_or_default]
46    pub sm: Column,
47
48    #[prop_or_default]
49    pub row_spacing: Option<i32>,
50
51    #[prop_or_default]
52    pub spacing: Option<i32>,
53
54    #[prop_or_default]
55    pub style: AttrValue,
56
57    #[prop_or_default]
58    pub wrap: FlexWrap,
59
60    #[prop_or_default]
61    pub xl: Column,
62
63    #[prop_or_default]
64    pub xs: Column,
65
66    #[prop_or(false)]
67    pub zero_min_width: bool,
68}
69
70#[function_component(Grid)]
71pub fn grid(_props: &Props) -> Html {
72    html! {
73        <>
74        </>
75    }
76}