24 lines
641 B
Rust
24 lines
641 B
Rust
|
|
use dioxus::prelude::*;
|
||
|
|
use dioxus_primitives::separator::{self, SeparatorProps};
|
||
|
|
use dioxus_primitives::{dioxus_attributes::attributes, merge_attributes};
|
||
|
|
|
||
|
|
#[css_module("/src/components/separator/style.css")]
|
||
|
|
struct Styles;
|
||
|
|
|
||
|
|
#[component]
|
||
|
|
pub fn Separator(props: SeparatorProps) -> Element {
|
||
|
|
let base = attributes!(div {
|
||
|
|
class: Styles::dx_separator,
|
||
|
|
});
|
||
|
|
let merged = merge_attributes(vec![base, props.attributes]);
|
||
|
|
|
||
|
|
rsx! {
|
||
|
|
separator::Separator {
|
||
|
|
horizontal: props.horizontal,
|
||
|
|
decorative: props.decorative,
|
||
|
|
attributes: merged,
|
||
|
|
{props.children}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|