Hi,
What does it mean <Styled(_NavLink) at Nav in storybook:
How can we use it?
<Nav className="mb-5">
<NavItem>
<Styled(_NavLink)
active
href="#"
icon="<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg"><path d="M2 5.055V11h2V8a1 1 0 011-1h2a1 1 0 011 1v3h2V4.969L6.043 1 2 5.055zM1 6.058l-.149.15a.497.497 0 01-.705 0 .501.501 0 010-.708L5.338.293a.995.995 0 011.41 0l5.106 5.121a.501.501 0 010 .707.497.497 0 01-.705 0L11 5.971V11a1 1 0 01-1 1H2a1 1 0 01-1-1V6.058zM5 11h2V8H5v3z" fill="#000" fill-rule="nonzero"></path></svg>"
>
Link 1
</Styled(_NavLink)>
</NavItem>
</Nav>
This is part of the Styled components that ExB provides
https://developers.arcgis.com/experience-builder/guide/widget-ui/#2-styled-components
Not sure what Styled does in this case, but it probably has some predefined styles for nav links.
Thanks @ReneRubalcava
I also though that it's kind of `styled-components`
but there is no documentations about that in the story
and what is the parameter that passed and how?! (_NavLink)
Thanks.
It looks like it's only used in the demo, the "Styled" comp isn't part o ExB, just for demo purposes. It's basically a styled component just created for the storybook.