Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
Hello,
I want to use the shopify polaris to make something like this, but each tab should have different contents.
Link Used: https://polaris.shopify.com/components/navigation/tabs#navigation
Thanks.
declare a variable, such like comp. and include components which you want to use. and create if else ladder so like i
let comp = '';
if(selected == 0)
{
comp = <Component 1/>
}
else if(selected == 1)
{
comp = <Component 2/>
}
...
return(
...
{comp} //Here is your assigned component. By help of selected index, components assigned to comp variable
...
);
if you are in trouble with this post, i can help you as far as i can.
User | RANK |
---|---|
5 | |
4 | |
4 | |
3 | |
3 |