EQWorks / react-labs

react components laboratory
https://eqworks.github.io/react-labs
MIT License
4 stars 0 forks source link

[G2M] tabs - add forwardRef to use with drawers #153

Closed tlowande closed 3 years ago

tlowande commented 3 years ago

context: ml-ui usecase to append a drawer anchored on the child component of that tab

quirks: commit 08c5198 uses storybook syntax BUT that is misleading. Under the hood Storybook seems to be merging the WithRef.args with default args of the component and then passing it to the component again. This means that we'd have to actually declare forwardRef not to get lost in translation. This gives the wrong idea that the array or references needs to be passed inside forwardRef when actual implementation needs it inside ref. So I went tru with 5a2ead7 story syntax

image