update Button shortcode

This commit is contained in:
somrat sorkar
2023-05-29 11:59:38 +06:00
parent a945dbff77
commit 2be55dbca4
3 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "astroplate",
"version": "1.2.1",
"version": "1.2.2",
"description": "Astro and Tailwindcss boilerplate",
"author": "zeon.studio",
"license": "MIT",
+1 -1
View File
@@ -134,7 +134,7 @@ window.addEventListener("load", (e) => {
### Button
<Button href="#" style="solid">Button</Button>
<Button label="Button" link="#" style="solid"/>
---
+8 -8
View File
@@ -1,19 +1,19 @@
import React from "react";
const Button = ({
href,
label,
link,
style,
rel,
children,
}: {
href: string;
style: string | null;
rel: string | null;
children: string;
label: string;
link: string;
style?: string;
rel?: string;
}) => {
return (
<a
href={href}
href={link}
target="_blank"
rel={`noopener noreferrer ${
rel ? (rel === "follow" ? "" : rel) : "nofollow"
@@ -22,7 +22,7 @@ const Button = ({
style === "outline" ? "btn-outline-primary" : "btn-primary"
}`}
>
{children}
{label}
</a>
);
};