mirror of
https://github.com/10h30/astroplate.git
synced 2026-06-05 15:08:00 +09:00
update Button shortcode
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "astroplate",
|
||||
"version": "1.2.1",
|
||||
"version": "1.2.2",
|
||||
"description": "Astro and Tailwindcss boilerplate",
|
||||
"author": "zeon.studio",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -134,7 +134,7 @@ window.addEventListener("load", (e) => {
|
||||
|
||||
### Button
|
||||
|
||||
<Button href="#" style="solid">Button</Button>
|
||||
<Button label="Button" link="#" style="solid"/>
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user