Add test data to Tab components
This commit is contained in:
@@ -97,6 +97,9 @@
|
||||
tabIndex: selected ? 0 : -1,
|
||||
disabled: disabled ? true : undefined,
|
||||
};
|
||||
$: if (process.env.NODE_ENV === "test") {
|
||||
Object.assign(propsWeControl, { ["data-headlessui-index"]: myIndex });
|
||||
}
|
||||
|
||||
$: slotProps = { selected };
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user