🚀 Feature: Add "auto" option to TechRadar width and height
🔖 Feature description
Add an "auto" value option to automatically and dynamically set width and height props of the <TechRadarPage />
If there's a way to do this, adding it to the docs would be good.
🎤 Context
The issue that I faced: I was trying to use a useSize hook with the content (BackstageContent-root) width/height and use it for the TechRadar's width and height props dynamically but it's tricky because it needs to be a direct child of FlatRoutes and I still didn't come to a functional JSX hierarchy to make this work.
Is there a way to make its width the width/height of the available content (BackstageContent-root) with custom code?
If not, adding an "auto" option for width or height would be a good solution maybe?
There are some hacky ways to do this bypassing React's lifecycle and accessing the dom directly but I felt it could have a standard API for this.
✌️ Possible Implementation
Using an useSize-like hook to set BackstageContent-root's width and height when prop is set to auto
👀 Have you spent some time to check if this feature request has been raised before?
- [X] I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- [X] I have read the Code of Conduct
Are you willing to submit PR?
Yes I am willing to submit a PR!
Any comments / ideas on this? Otherwise, I'll start creating a PR with the solution proposed, thanks for moving it @benjdlambert!
Contributions welcome!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.