Compare commits
3 commits
00adaed6a8
...
95a37c9aca
Author | SHA1 | Date | |
---|---|---|---|
95a37c9aca | |||
852d647f09 | |||
a390b5a02f |
2 changed files with 3 additions and 1 deletions
|
@ -3,6 +3,7 @@ package components
|
||||||
type ContentHref struct {
|
type ContentHref struct {
|
||||||
Text string
|
Text string
|
||||||
Link string
|
Link string
|
||||||
|
Target string // _blank _parent _self _top
|
||||||
Icon string
|
Icon string
|
||||||
IsButton bool
|
IsButton bool
|
||||||
TypeClass string // type primary, secondary, success, danger, warning, info, light, dark, link
|
TypeClass string // type primary, secondary, success, danger, warning, info, light, dark, link
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{{define "content_href"}}
|
{{define "content_href"}}
|
||||||
<a class="{{if eq .IsButton true}} btn btn-{{.TypeClass}}{{end}} {{if eq .IsDisabled true}}disabled{{end}}"
|
<a class="{{if eq .IsButton true}} btn btn-{{.TypeClass}}{{end}} {{if eq .IsDisabled true}}disabled{{end}}"
|
||||||
|
{{if .Target}} target="{{.Target}}"{{end}}
|
||||||
href="{{.Link}}" {{if eq .IsButton true}}role="button"{{end}} {{if eq .IsDisabled true}}aria-disabled="true"{{end}}>
|
href="{{.Link}}" {{if eq .IsButton true}}role="button"{{end}} {{if eq .IsDisabled true}}aria-disabled="true"{{end}}>
|
||||||
{{.Text}}
|
{{.Text}}
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in a new issue