use super::{Brush, Modifier, RoundedCornerShape, inspector_metadata};
use crate::modifier_nodes::BorderElement;
impl Modifier {
pub fn border(self, width: f32, brush: impl Into<Brush>, shape: RoundedCornerShape) -> Self {
let brush = brush.into();
let metadata = inspector_metadata("border", |info| {
info.add_property("width", format!("{width}"));
info.add_property("brush", format!("{brush:?}"));
});
let modifier = Self::with_element(BorderElement::new(width, brush, shape))
.with_inspector_metadata(metadata);
self.then(modifier)
}
}
#[cfg(test)]
#[path = "tests/border_tests.rs"]
mod tests;