-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
as={Component} not exposed from react-focus-lock #42
Comments
That's theoretically possible, but is it actually needed? Could you please explain your use case?
|
Hey, sorry for the late reply, the reason was for semantics, I didn't think a nav should be inside a div. With a screenreader it never picked up the navigation when it was inside a div, but when you have the header with a nav it did. |
But could https://caninclude.glitch.me/can/include/?child=nav&parent=div Anyway, I've got you |
Thank you, will be interested to see the solution as I did spend a few hours looking around haha |
Shipped as a part of v3.5.0 |
I am trying to use react-focus-on with the as= prop to render my own nav without it being nested inside a div. As seen here:
however, it doesnt seem to be exposed from react-focus-lock.
EDIT: Have done a little digging and it seems internally the as is being used as RemoveScroll, and RemoveScroll is using a div, maybe we could pass through the as prop to removeScroll and that renders the component if provided?
Ive tried to use and implement forwardProps and that removed the div but then the lock didnt work.
The text was updated successfully, but these errors were encountered: