Implement properties for Note component
This commit is contained in:
@@ -1,11 +1,23 @@
|
|||||||
---
|
---
|
||||||
import { Icon } from 'astro-icon/components';
|
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">
|
<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">
|
<div class="max-w-6xl mx-auto px-4 sm:px-6 py-4 text-md text-center font-medium">
|
||||||
<span class="font-bold">
|
<Icon name={icon} class="w-5 h-5 inline-block align-text-bottom" />
|
||||||
<Icon name="tabler:info-square" class="w-5 h-5 inline-block align-text-bottom" /> Philosophy:</span
|
<span class="font-bold" set:html={title} />
|
||||||
> Simplicity, Best Practices and High Performance
|
<Fragment set:html={description} />
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ const metadata = {
|
|||||||
|
|
||||||
<!-- Note Widget ******************* -->
|
<!-- Note Widget ******************* -->
|
||||||
|
|
||||||
<Note />
|
<Note title="Philosophy:" description="Simplicity, Best Practices and High Performance" />
|
||||||
|
|
||||||
<!-- Features Widget *************** -->
|
<!-- Features Widget *************** -->
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user