{
- ([id, label]) =>
+ ([id, { label, options: { closable = false } }]) =>
+
+
+
+
+
+
+
}
{props.children}
- ;
+ ;
}
-export const Tab: ParentComponent<{ id: string, label: string }> = (props) => {
+export const Tab: ParentComponent<{ id: string, label: string, closable?: boolean }> = (props) => {
const context = useTabs();
- const isActive = context.register(props.id, props.label);
+ const isActive = context.register(props.id, props.label, {
+ closable: props.closable ?? false
+ });
const resolved = children(() => props.children);
- return