pub fn icon_button<'a, Message, Renderer>(
icon_content: impl IntoFragment<'a>,
variant: IconButtonVariant,
) -> Button<'a, Message, Renderer>Examples found in repository?
examples/showcase/pages/structure.rs (line 257)
248fn side_sheet_content(
249 title: &'static str,
250 supporting: &'static str,
251) -> material::Element<'static, Message> {
252 use material::widget::button::{self, ButtonVariant, IconButtonVariant};
253
254 let header = Row::new()
255 .push(material::text::title_medium(title).width(Length::Fill))
256 .push(button::action(
257 button::icon_button("close", IconButtonVariant::Standard),
258 Message::Decrement,
259 ))
260 .align_y(alignment::Vertical::Center);
261 let actions = Row::new()
262 .push(Space::new().width(Length::Fill))
263 .push(button::action(
264 button::button("Apply", ButtonVariant::Filled),
265 Message::Increment,
266 ))
267 .spacing(page::ROW_SPACING)
268 .align_y(alignment::Vertical::Center);
269
270 material::widget::sheet::side_content(
271 Column::new()
272 .push(header)
273 .push(material::text::body_medium(supporting))
274 .push(Space::new().height(Length::Fill))
275 .push(actions)
276 .spacing(page::COMPACT_STACK_SPACING)
277 .height(Length::Fill),
278 )
279 .into()
280}