pub fn tab(
theme: &Theme,
key: impl Into<SharedString>,
label: Label,
state: State,
) -> Stateful<Div>Expand description
One tab, up to the ×: pass the same key to close and chain the
result on as a child.
key names both the element and the hover group Close::OnHover reads,
so the two are derived from one string rather than written twice.
Every tab but a State::Focused one takes its own hover, and gpui panics
on a second one: reach for Close::OnHover’s group, or a group_hover of
your own, rather than chaining .hover(..) onto what this returns.