Files
bsky-social-app/src/components/FocusScope/index.web.tsx
T
2026-08-24 12:33:38 +02:00

15 lines
453 B
TypeScript

import * as RadixFocusScope from '@radix-ui/react-focus-scope'
/*
* The web version of the FocusScope component is a proper implementation, we
* use this in Dialogs and such already. It's here as a convenient counterpart
* to the hacky native solution.
*/
export function FocusScope({children}: {children: React.ReactNode}) {
return (
<RadixFocusScope.FocusScope loop asChild trapped>
{children}
</RadixFocusScope.FocusScope>
)
}