Select to view content in your preferred language

Arcgis experience storybook Styled

418
3
01-10-2022 11:28 AM
Dvirus
by
Regular Contributor

Hi,

What does it mean <Styled(_NavLink) at Nav in storybook:

https://developers.arcgis.com/experience-builder/storybook/?path=/docs/components-jimu-ui-index-nav-...

How can we use it?

 

 <Nav className="mb-5">
    <NavItem>
      <Styled(_NavLink)
        active
        href="#"
        icon="<svg viewBox=&quot;0 0 12 12&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;><path d=&quot;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&quot; fill=&quot;#000&quot; fill-rule=&quot;nonzero&quot;></path></svg>"
      >
        Link 1
      </Styled(_NavLink)>
    </NavItem>
</Nav>

 

 

 

 

0 Kudos
3 Replies
ReneRubalcava
Honored Contributor

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.

0 Kudos
Dvirus
by
Regular Contributor

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.

0 Kudos
ReneRubalcava
Honored Contributor

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. 

0 Kudos