theKashey / react-focus-lock

It is a trap! A lock for a Focus. 🔓
MIT License
1.27k stars 67 forks source link

Update InFocusGuard to make children prop optional #191

Closed johnhok closed 1 year ago

johnhok commented 2 years ago

The children property is optional in the InFocusGuard component. This updates the typescript interface so that it doesn't complain about children being required when we use <InFocusGuard />.

theKashey commented 1 year ago

Sorry for being sooooo late, but that is the use case to use empty InFocusGuard?

stale[bot] commented 1 year ago

This issue has been marked as "stale" because there has been no activity for 2 months. If you have any new information or would like to continue the discussion, please feel free to do so. If this issue got buried among other tasks, maybe this message will reignite the conversation. Otherwise, this issue will be closed in 7 days. Thank you for your contributions so far.

johnhok commented 1 year ago

Sorry for being sooooo late, but that is the use case to use empty InFocusGuard?

Sorry @theKashey, missed your reply, the use case is for these example usages where you have InFocusGuard without any children.

Screenshot 2023-05-13 at 10 08 46 PM
theKashey commented 1 year ago

🤝