Components / IconButton
IconButton
Square, icon-only button for toolbars.
Example
The component itself, running in WebAssembly, beside its code in a playground. Try it.
Code
use ravenrs::prelude::*;
fn icon_button() -> impl View {
HStack::new((
IconButton::new(IconName::Pencil).label("Edit"),
IconButton::new(IconName::Copy).label("Duplicate"),
IconButton::new(IconName::Settings).label("Settings").style(ButtonStyle::Secondary),
IconButton::new(IconName::Plus).label("New").style(ButtonStyle::Primary),
IconButton::new(IconName::Bold).label("Bold").selected(true),
))
.spacing(8.0)
}