Skip to content

Commit 1b4d3af

Browse files
jluyaureidbarber
andauthored
add ClearSlots around contextual help's slot provider for dialog (#3635)
Co-authored-by: Reid Barber <[email protected]>
1 parent a19d238 commit 1b4d3af

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/@react-spectrum/contextualhelp/src/ContextualHelp.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
import {ActionButton} from '@react-spectrum/button';
14-
import {classNames, SlotProvider} from '@react-spectrum/utils';
14+
import {classNames, ClearSlots, SlotProvider} from '@react-spectrum/utils';
1515
import {Dialog, DialogTrigger} from '@react-spectrum/dialog';
1616
import {FocusableRef} from '@react-types/shared';
1717
import HelpOutline from '@spectrum-icons/workflow/HelpOutline';
@@ -52,11 +52,13 @@ function ContextualHelp(props: SpectrumContextualHelpProps, ref: FocusableRef<HT
5252
isQuiet>
5353
{icon}
5454
</ActionButton>
55-
<SlotProvider slots={slots}>
56-
<Dialog UNSAFE_className={classNames(helpStyles, 'react-spectrum-ContextualHelp-dialog')}>
57-
{children}
58-
</Dialog>
59-
</SlotProvider>
55+
<ClearSlots>
56+
<SlotProvider slots={slots}>
57+
<Dialog UNSAFE_className={classNames(helpStyles, 'react-spectrum-ContextualHelp-dialog')}>
58+
{children}
59+
</Dialog>
60+
</SlotProvider>
61+
</ClearSlots>
6062
</DialogTrigger>
6163
);
6264
}

0 commit comments

Comments
 (0)