This commit is contained in:
@@ -12,6 +12,20 @@ type SegmentedLink struct {
|
||||
Class string
|
||||
}
|
||||
|
||||
func actionLinkClass(class string) string {
|
||||
if class == "" {
|
||||
return "web2-button"
|
||||
}
|
||||
return class
|
||||
}
|
||||
|
||||
func segmentedLinkClass(class string) string {
|
||||
if class == "" {
|
||||
return "web3-button"
|
||||
}
|
||||
return class
|
||||
}
|
||||
|
||||
templ PageHeader(pill string, title string, subtitle string, actions []ActionLink) {
|
||||
<div class="web2-page-head-row">
|
||||
<div class="web2-head-copy">
|
||||
@@ -26,7 +40,7 @@ templ PageHeader(pill string, title string, subtitle string, actions []ActionLin
|
||||
if len(actions) > 0 {
|
||||
<div class="web2-actions">
|
||||
for _, action := range actions {
|
||||
<a class={ action.Class } href={ action.Href }>{ action.Label }</a>
|
||||
<a class={ actionLinkClass(action.Class) } href={ action.Href }>{ action.Label }</a>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@@ -37,7 +51,7 @@ templ SegmentedActions(actions []SegmentedLink) {
|
||||
if len(actions) > 0 {
|
||||
<div class="web3-button-group">
|
||||
for _, action := range actions {
|
||||
<a class={ action.Class } href={ action.Href }>{ action.Label }</a>
|
||||
<a class={ segmentedLinkClass(action.Class) } href={ action.Href }>{ action.Label }</a>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@@ -45,7 +59,7 @@ templ SegmentedActions(actions []SegmentedLink) {
|
||||
|
||||
templ SectionHead(title string, badge string) {
|
||||
<div class="web2-section-head">
|
||||
<h2>{ title }</h2>
|
||||
<h2 class="web2-section-title">{ title }</h2>
|
||||
if badge != "" {
|
||||
<span class="web2-badge">{ badge }</span>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user