use dioxus::core::{AttributeValue, IntoAttributeValue};
use dioxus::prelude::*;
#[derive(Clone, PartialEq)]
pub struct IconSize(AttributeValue);
impl IconSize {
pub(crate) fn into_value(self) -> AttributeValue {
self.0
}
}
impl Default for IconSize {
fn default() -> Self {
Self(AttributeValue::Int(24))
}
}
impl<T> From<T> for IconSize
where
T: IntoAttributeValue,
{
fn from(value: T) -> Self {
Self(value.into_value())
}
}
#[derive(Clone, PartialEq, Props)]
pub struct IconProps {
#[props(into, default = IconSize::default())]
pub size: IconSize,
#[props(extends = SvgAttributes)]
pub attributes: Vec<Attribute>,
}