add rel attribute to button shortcode

This commit is contained in:
sculptor189 2024-08-10 15:15:59 -04:00
parent 580f36f0de
commit 213880a1a3
3 changed files with 3 additions and 2 deletions

View file

@ -104,7 +104,7 @@ New article!
## Button
`button` outputs a styled button component which can be used to highlight a primary action. It has two optional variables `href` and `target` which can be used to specify the URL and target of the link.
`button` outputs a styled button component which can be used to highlight a primary action. It has three optional variables `href`, `target` and `rel` which can be used to specify the URL, target and relation of the link.
**Example:**

View file

@ -104,7 +104,7 @@ New article!
## Button
`button` outputs a styled button component which can be used to highlight a primary action. It has two optional variables `href` and `target` which can be used to specify the URL and target of the link.
`button` outputs a styled button component which can be used to highlight a primary action. It has three optional variables `href`, `target` and `rel` which can be used to specify the URL, target and relation of the link.
**Example:**

View file

@ -2,6 +2,7 @@
class="!rounded-md bg-primary-600 px-4 py-2 !text-neutral !no-underline hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
{{ with .Get "href" }}href="{{ . }}"{{ end }}
{{ with .Get "target" }}target="{{ . }}"{{ end }}
{{ with .Get "rel" }}rel="{{ . }}"{{ end }}
role="button"
>
{{ .Inner }}