Description
Added UseFullscreenDemo.jsx and useFullscreen.mdx files for documentation details. Also, added useFullscreen to docs/README.md.
Acceptance Criteria
[x] The documentation for a hook/utility should show, as best as possible, how it works in action, so a complete usage example
[x] The newly added item should be referenced in all other instances where other items are referenced in the docs/readme.
Note
I added two examples to the useFullscreen.mdx file because I wasn't sure if this hook was only supposed to be used for making a window fullscreen. The first example shows with the document.documentElement being used; however, if this was the intended purpose, couldn't it just be done in the hook itself?
It will also work with an element, but then only that element is enlarged to fullscreen, not the entire document. I looked through previous pull requests but the one I saw mentioning it didn't explicitly define which purpose was intended, unless I overlooked it. If the option is intentional, I would imagine a refactor could be made where the hook would set the document.documentElement by default unless another reference was passed to it. Either way, here is how it looks at the moment.
Pull Request Description
Description Added
UseFullscreenDemo.jsx
anduseFullscreen.mdx
files for documentation details. Also, addeduseFullscreen
todocs/README.md
.Acceptance Criteria
Note I added two examples to the
useFullscreen.mdx
file because I wasn't sure if this hook was only supposed to be used for making a window fullscreen. The first example shows with the document.documentElement being used; however, if this was the intended purpose, couldn't it just be done in the hook itself? It will also work with an element, but then only that element is enlarged to fullscreen, not the entire document. I looked through previous pull requests but the one I saw mentioning it didn't explicitly define which purpose was intended, unless I overlooked it. If the option is intentional, I would imagine a refactor could be made where the hook would set the document.documentElement by default unless another reference was passed to it. Either way, here is how it looks at the moment.Demo: