summaryrefslogtreecommitdiff
path: root/src/components/Card.astro
diff options
context:
space:
mode:
authorTomas Bankauskas <tbdizainas@gmail.com>2024-04-04 15:23:09 +0300
committerGitHub <noreply@github.com>2024-04-04 15:23:09 +0300
commit4df0e4a754ea5e1fb0d05a4e08a53cd49e9fce16 (patch)
treed695b3f987ccf7113ba73b467a94082457be63ea /src/components/Card.astro
parent5c66b0550a6e3bd6b558da4229bcb6be2d9244f6 (diff)
Added Daisy UI and basic components (#3)
* added daisyui * added Footer.astro * updated Header.astro, added Card.astro, etc * small adjustments
Diffstat (limited to 'src/components/Card.astro')
-rw-r--r--src/components/Card.astro29
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>