google / mesop

https://google.github.io/mesop/
Apache License 2.0
21 stars 7 forks source link

Add Material tab component #93

Open wwwillchen opened 1 month ago

wwwillchen commented 1 month ago

https://material.angular.io/components/tabs/overview

wwwillchen commented 3 weeks ago

Discussed API with @richard-to:

with me.tabs() as t:
  with t.tab("tab1"):
     me.text("hi")
  with t.tab("tab2"):
     me.text("hi")

This seems better than the more implicit alternative syntax of:

with me.tab("1"):
  me.text("a")
with me.tab("2"):
  me.text("b") 

Because what happens if there's something in-between the tabs?

with me.tab("1"):
  me.text("a")
me.text("does this split the tabs into two tab groups?")
with me.tab("2"):
  me.text("b")