summaryrefslogtreecommitdiff
path: root/src/components/widgets/Note.astro
diff options
context:
space:
mode:
authorDawid Rycerz <dawid@rycerz.xyz>2025-07-21 21:56:55 +0300
committerDawid Rycerz <dawid@rycerz.xyz>2025-07-21 21:56:55 +0300
commitc735556726e75428550a3d28a2cf58e2c8490b7d (patch)
treefd0ae29d1636b825abeedff6b99d3376bb383135 /src/components/widgets/Note.astro
Initial template
Diffstat (limited to 'src/components/widgets/Note.astro')
-rw-r--r--src/components/widgets/Note.astro23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/components/widgets/Note.astro b/src/components/widgets/Note.astro
new file mode 100644
index 0000000..3594b39
--- /dev/null
+++ b/src/components/widgets/Note.astro
@@ -0,0 +1,23 @@
+---
+import { Icon } from 'astro-icon/components';
+
+export interface Props {
+ icon?: string;
+ title?: string;
+ description?: string;
+}
+
+const {
+ icon = 'tabler:info-square',
+ title = await Astro.slots.render('title'),
+ description = await Astro.slots.render('description'),
+} = Astro.props;
+---
+
+<section class="bg-blue-50 dark:bg-slate-800 not-prose">
+ <div class="max-w-6xl mx-auto px-4 sm:px-6 py-4 text-md text-center font-medium">
+ <Icon name={icon} class="w-5 h-5 inline-block align-text-bottom font-bold" />
+ <span class="font-bold" set:html={title} />
+ <Fragment set:html={description} />
+ </div>
+</section>