pub fn node_header<'a, Message>(
content: impl Into<Element<'a, Message, Theme, Renderer>>,
background: Color,
radii: impl Into<EdgeRadii>,
) -> Container<'a, Message, Theme, Renderer>where
Message: Clone + 'a,Expand description
Wraps content in a Length::Fill header: a rounded box with its top two
corners rounded to radii and filled with background.
radii accepts a single value (both corners equal) or a (left, right)
tuple. To match a node’s silhouette exactly, pass the node’s corner_radius.
The returned Container can be laid out further by the caller.
§Example
ⓘ
use iced_nodegraph::node_header;
use iced::{widget::text, Color};
let header = node_header(text("Title"), Color::from_rgb(0.2, 0.3, 0.4), 5.0);
let header = node_header(text("Title"), Color::BLACK, (4.0, 8.0));