zu/speed_dial/
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
5use yew::{function_component, html, AttrValue, Callback, Children, Classes, Html, Properties};
6
7use crate::styles::direction::Direction;
8use crate::styles::transition_duration::TransitionDuration;
9
10#[derive(Debug, Clone, PartialEq, Properties)]
11pub struct Props {
12    pub arial_label: AttrValue,
13
14    #[prop_or_default]
15    pub children: Children,
16
17    #[prop_or_default]
18    pub classes: Classes,
19
20    #[prop_or_default]
21    pub direction: Direction,
22
23    #[prop_or(false)]
24    pub hidden: bool,
25
26    #[prop_or_default]
27    pub icon: Option<Html>,
28
29    #[prop_or_default]
30    pub on_close: Option<Callback<()>>,
31
32    #[prop_or_default]
33    pub on_open: Option<Callback<()>>,
34
35    #[prop_or(false)]
36    pub open: bool,
37
38    #[prop_or_default]
39    pub open_icon: Option<Html>,
40
41    #[prop_or_default]
42    pub style: AttrValue,
43
44    // TODO(Shaohua): Add TransitionComponent
45    #[prop_or_default]
46    pub transition_duration: TransitionDuration,
47}
48
49#[function_component(SpeedDial)]
50pub fn speed_dial(_props: &Props) -> Html {
51    html! {
52        <>
53        </>
54    }
55}