1use derive_more::Display;
2use std::borrow::Cow;
3use yew::html::IntoPropValue;
4
5#[derive(Clone, Debug, Display, PartialEq, Eq)]
7#[display(fmt = "is-{}")]
8pub enum Alignment {
9 #[display(fmt = "left")]
10 Left,
11 #[display(fmt = "centered")]
12 Centered,
13 #[display(fmt = "right")]
14 Right,
15}
16
17#[derive(Clone, Debug, Display, PartialEq, Eq)]
19#[display(fmt = "is-{}")]
20pub enum Size {
21 #[display(fmt = "small")]
22 Small,
23 #[display(fmt = "normal")]
24 Normal,
25 #[display(fmt = "medium")]
26 Medium,
27 #[display(fmt = "large")]
28 Large,
29}
30
31impl IntoPropValue<Cow<'static, str>> for Size {
32 fn into_prop_value(self) -> Cow<'static, str> {
33 Cow::from(self.to_string())
34 }
35}