Created by: sirdarthvader
Description of PR
This PR is against the issue number #2076 (closed)
The issue was with the default position of the tooltip, while it was not an issue on desktop, for mobile devices, tooltip created this extra space in the body of the page.
So I have added a conditional style object for tooltip element basis the viewport size of the device. If it's a mobile device tooltip element would have added top and right CSS attributes keeping it overflowing from viewport.
Introduced a new custom hook function called located in useViewPort.js under the hooks folder.
All the proposed changes will have an effect only on devices smaller or equal to 480px in width.
Relevant Issues
Fixes #2076 (closed)
Checklist
-
Compiles and passes lint tests -
Properly formatted -
Tested on desktop -
Tested on phone
Screenshots
Add relevant screenshots here As seen on production
Changes from this PR