tabTriggerAttrs function
Implementation
Map<String, String> tabTriggerAttrs({
required String groupId,
required String tabId,
bool active = false,
bool disabled = false,
}) {
final Map<String, String> out = <String, String>{
'data-arcane-tabs-group': groupId,
'data-arcane-tab': tabId,
'data-arcane-state': active ? 'active' : 'inactive',
'role': 'tab',
'aria-selected': active ? 'true' : 'false',
'tabindex': active ? '0' : '-1',
};
if (disabled) out['data-arcane-disabled'] = 'true';
return out;
}