You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<Dialog> renders a <section> element and controls when it is focused.
It would be helpful if the className and children both accepted callbacks that included the focus state of the dialog, e.g. isFocused and isFocusVisible, like other react-aria components.
🤔 Expected Behavior?
children and className should both accept callbacks that receive the focused state.
😯 Current Behavior
<Dialog> render props only include a close callback:
Provide a general summary of the feature here
<Dialog>
renders a<section>
element and controls when it is focused.It would be helpful if the
className
andchildren
both accepted callbacks that included the focus state of the dialog, e.g.isFocused
andisFocusVisible
, like other react-aria components.🤔 Expected Behavior?
children
andclassName
should both accept callbacks that receive the focused state.😯 Current Behavior
<Dialog>
render props only include aclose
callback:react-spectrum/packages/react-aria-components/src/Dialog.tsx
Lines 25 to 27 in 5cacbdb
Only
children
accepts a callback.className
only accepts strings:react-spectrum/packages/react-aria-components/src/Dialog.tsx
Lines 29 to 32 in 5cacbdb
💁 Possible Solution
No response
🔦 Context
I'm using render props to conditionally apply focus styles in other react-aria components, however I can't do so when using
<Dialog>
.I'm currently working around the problem by using native CSS pseudo-classes, which is fine but inconsistent.
💻 Examples
No response
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: