singlestage/components/sidebar/
footer.rs1use super::SidebarContext;
2use leptos::prelude::*;
3
4#[component]
5pub fn SidebarFooter(
6 children: Children,
7
8 #[prop(optional, into)]
13 accesskey: MaybeProp<String>,
14 #[prop(optional, into)]
19 autocapitalize: MaybeProp<String>,
20 #[prop(optional, into)]
23 autofocus: MaybeProp<bool>,
24 #[prop(optional, into)]
26 class: MaybeProp<String>,
27 #[prop(optional, into)]
31 contenteditable: MaybeProp<String>,
32 #[prop(optional, into)]
36 dir: MaybeProp<String>,
37 #[prop(optional, into)]
39 draggable: MaybeProp<bool>,
40 #[prop(optional, into)]
42 enterkeyhint: MaybeProp<String>,
43 #[prop(optional, into)]
45 exportparts: MaybeProp<String>,
46 #[prop(optional, into)]
48 hidden: MaybeProp<String>,
49 #[prop(optional, into)]
51 id: MaybeProp<String>,
52 #[prop(optional, into)]
54 inert: MaybeProp<bool>,
55 #[prop(optional, into)]
58 inputmode: MaybeProp<String>,
59 #[prop(optional, into)]
61 is: MaybeProp<String>,
62 #[prop(optional, into)]
64 itemid: MaybeProp<String>,
65 #[prop(optional, into)]
67 itemprop: MaybeProp<String>,
68 #[prop(optional, into)]
70 itemref: MaybeProp<String>,
71 #[prop(optional, into)]
73 itemscope: MaybeProp<String>,
74 #[prop(optional, into)]
76 itemtype: MaybeProp<String>,
77 #[prop(optional, into)]
79 lang: MaybeProp<String>,
80 #[prop(optional, into)]
82 nonce: MaybeProp<String>,
83 #[prop(optional, into)]
85 part: MaybeProp<String>,
86 #[prop(optional, into)]
88 popover: MaybeProp<String>,
89 #[prop(optional, into)]
91 role: MaybeProp<String>,
92 #[prop(optional, into)]
94 slot: MaybeProp<String>,
95 #[prop(optional, into)]
99 spellcheck: MaybeProp<String>,
100 #[prop(optional, into)]
102 style: MaybeProp<String>,
103 #[prop(optional, into)]
105 tabindex: MaybeProp<usize>,
106 #[prop(optional, into)]
108 title: MaybeProp<String>,
109 #[prop(optional, into)]
111 translate: MaybeProp<String>,
112) -> impl IntoView {
113 let sidebar = expect_context::<SidebarContext>();
114
115 let global_attrs_1 = view! {
116 <{..}
117 accesskey=move || accesskey.get()
118 autocapitalize=move || autocapitalize.get()
119 autofocus=move || autofocus.get()
120 class=move || class.get()
121 contenteditable=move || contenteditable.get()
122 dir=move || dir.get()
123 draggable=move || draggable.get()
124 enterkeyhint=move || enterkeyhint.get()
125 exportparts=move || exportparts.get()
126 hidden=move || hidden.get()
127 id=move || id.get()
128 inert=move || inert.get()
129 inputmode=move || inputmode.get()
130 is=move || is.get()
131 itemid=move || itemid.get()
132 />
133 };
134
135 let global_attrs_2 = view! {
136 <{..}
137 itemprop=move || itemprop.get()
138 itemref=move || itemref.get()
139 itemscope=move || itemscope.get()
140 itemtype=move || itemtype.get()
141 lang=move || lang.get()
142 nonce=move || nonce.get()
143 part=move || part.get()
144 popover=move || popover.get()
145 role=move || role.get()
146 slot=move || slot.get()
147 spellcheck=move || spellcheck.get()
148 style=move || style.get()
149 tabindex=move || tabindex.get()
150 title=move || title.get()
151 translate=move || translate.get()
152 />
153 };
154
155 view! {
156 <footer
157 on:click=move |_| sidebar.close_if_small_screen()
158
159 {..global_attrs_1}
160 {..global_attrs_2}
161 >
162 {children()}
163 </footer>
164 }
165}