How to Create a Tab UI with Riot 2.0
robertwpearce.com
How to Create a Tab UI with Riot 2.0
1–8 of 8 posts
Re: How to Create a Tab UI with Riot 2.0
#2Re: How to Create a Tab UI with Riot 2.0
#3 class={ tabItem: true, is_active: something() }
you can just write class="tabItem { is_active: something() }"Re: How to Create a Tab UI with Riot 2.0
#4Re: How to Create a Tab UI with Riot 2.0
#5Re: How to Create a Tab UI with Riot 2.0
#6Instead of class={ tabItem: true, is_active: something() } you can just write class="tabItem { is_active: something() }"
Re: How to Create a Tab UI with Riot 2.0
#7Aside from the usual unpleasantness of muddling together views and logic (and welcome back `onclick`, how I've missed you...), I find the idea of the "parent" scope rather troubling. If you have something nested inside a tab, let's say a link, what is its parent - an individual tab, or the whole "tabs" component?
Re: How to Create a Tab UI with Riot 2.0
#8Custom elements must contain a hyphen: http://w3c.github.io/webcomponents/spec/custom/#dfn-custom-e... . Just ` ` is not allowed.
> W3C specification demands you use a dash in the tag name. Instead of you must write . Obey this rule if you care about W3C. Both work fine.
However using hyphens to be standards-compliant and future compatible would be better.