wolf_graph_mermaid/
group_attributes.rs

1use crate::{details::format_custom_style, Color};
2
3#[derive(Debug, Clone, PartialEq)]
4pub struct GroupAttributes {
5    pub label: Option<String>,
6    pub fill_color: Option<Color>,
7    pub stroke_color: Option<Color>,
8}
9
10impl GroupAttributes {
11    pub fn new(label: Option<String>, fill_color: Option<Color>, stroke_color: Option<Color>) -> Self {
12        Self {
13            label,
14            fill_color,
15            stroke_color,
16        }
17    }
18
19    pub fn custom_style(&self) -> Option<String> {
20        format_custom_style(self.fill_color.as_ref(), self.stroke_color.as_ref(), None, None)
21    }
22}