use maud::{Markup, html};
use crate::components::field::{FieldTitle, field_title};
pub struct Detail {
pub children: Markup,
}
pub fn detail(children: Markup) -> Markup {
html! { div { (children) } }
}
pub struct DetailHeader<'a> {
pub title: &'a str,
pub actions: Markup,
}
pub fn detail_header(opts: DetailHeader<'_>) -> Markup {
html! {
div class="flex flex-wrap items-center justify-between gap-2 mb-4" {
(field_title(FieldTitle {
value: opts.title,
classes: "mb-0",
}))
div class="flex flex-wrap items-center gap-2" {
(opts.actions)
}
}
}
}