#![allow(non_snake_case)]
use repose_core::*;
use repose_ui::Box;
use super::*;
#[derive(Clone, Debug)]
pub struct DividerConfig {
pub modifier: Modifier,
pub thickness: f32,
pub color: Color,
}
impl Default for DividerConfig {
fn default() -> Self {
Self {
modifier: Modifier::new(),
thickness: DividerDefaults::THICKNESS,
color: DividerDefaults::color(),
}
}
}
pub fn HorizontalDivider(config: DividerConfig) -> View {
Box(Modifier::new()
.min_width(200.0)
.height(config.thickness)
.background(config.color)
.then(config.modifier))
}
#[deprecated(since = "0.19.5", note = "renamed to HorizontalDivider")]
pub fn Divider(config: DividerConfig) -> View {
HorizontalDivider(config)
}
pub fn VerticalDivider(config: DividerConfig) -> View {
Box(Modifier::new()
.width(config.thickness)
.fill_max_height()
.background(config.color)
.then(config.modifier))
}