mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
feat(tabs): support icon
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
{{- $label := .Get "label" -}}
|
||||
{{- $icon := .Get "icon" -}}
|
||||
{{- $index := .Parent.Store.Get "tab-index" | default 0 -}}
|
||||
{{- $content := .InnerDeindent | strings.TrimSpace | .Page.RenderString -}}
|
||||
|
||||
{{- $tabs := .Parent.Store.Get "tabs" | default slice -}}
|
||||
{{- .Parent.Store.Set "tabs" ($tabs | append (dict "label" $label "content" $content)) -}}
|
||||
{{- .Parent.Store.Set "tabs" ($tabs | append (dict "label" $label "icon" $icon "content" $content)) -}}
|
||||
{{- .Parent.Store.Set "tab-index" (add 1 $index) -}}
|
||||
|
||||
Reference in New Issue
Block a user