diff options
Diffstat (limited to 'src/components/Card.astro')
| -rw-r--r-- | src/components/Card.astro | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/components/Card.astro b/src/components/Card.astro new file mode 100644 index 0000000..cbe0b0a --- /dev/null +++ b/src/components/Card.astro @@ -0,0 +1,29 @@ +--- +interface Props { + title?: string; + text?: string; + linkText?: string; + href?: string; +} + +const { title, text, linkText, href } = Astro.props; +--- + +<div class="bg-white text-neutral-600 card"> + <div class="card-body"> + {title && <h3 class="text-neutral-900 card-title">{title}</h3>} + {text && <p>{text}</p>} + { + linkText && href && ( + <div class="card-actions"> + <a + href={href} + class="transition link text-neutral-900 hover:opacity-80" + > + {linkText} + </a> + </div> + ) + } + </div> +</div> |
