chore(templates): prettier plugin & tables
This commit is contained in:
@@ -1,14 +1,21 @@
|
||||
<!-- Variant -->
|
||||
{{ $baseClass := "transition duration-100 ease-in font-medium w-full h-full px-2 py-1 text-white" }}
|
||||
{{ if eq .Variant "Secondary" }}
|
||||
{{ $baseClass = printf "bg-black shadow-md hover:text-black hover:bg-white %s" $baseClass }}
|
||||
{{ $baseClass = printf "bg-black shadow-md hover:text-black hover:bg-white %s" $baseClass }}
|
||||
{{ else }}
|
||||
{{ $baseClass = printf "bg-gray-500 dark:text-gray-800 hover:bg-gray-800 dark:hover:bg-gray-100 %s" $baseClass }}
|
||||
{{ $baseClass = printf "bg-gray-500 dark:text-gray-800 hover:bg-gray-800 dark:hover:bg-gray-100 %s" $baseClass }}
|
||||
{{ end }}
|
||||
<!-- Type -->
|
||||
{{ if eq .Type "Link" }}
|
||||
<a href="{{ .URL }}" class="text-center {{ $baseClass }}" type="submit">{{ .Title }}</a>
|
||||
<a href="{{ .URL }}" class="text-center {{ $baseClass }}" type="submit"
|
||||
>{{ .Title }}</a
|
||||
>
|
||||
{{ else }}
|
||||
<button class="{{ $baseClass }}" type="submit" {{ if .FormName }} form="{{ .FormName}}" {{ end }}>{{ .Title }}
|
||||
</button>
|
||||
<button
|
||||
class="{{ $baseClass }}"
|
||||
type="submit"
|
||||
{{ if .FormName }}form="{{ .FormName }}"{{ end }}
|
||||
>
|
||||
{{ .Title }}
|
||||
</button>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user