refactor: extract a Callout component
This commit is contained in:
parent
2054ebb536
commit
ba7be84016
2 changed files with 18 additions and 4 deletions
15
src/components/Callout.astro
Normal file
15
src/components/Callout.astro
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
interface Props {
|
||||
title: string;
|
||||
}
|
||||
|
||||
const { title } = Astro.props as Props;
|
||||
---
|
||||
|
||||
<aside
|
||||
class="p-6 my-8 border border-gray-300 dark:bg-gray-800 dark:border-gray-700"
|
||||
>
|
||||
<h2 class="mt-0">{title}</h2>
|
||||
|
||||
<slot />
|
||||
</aside>
|
Loading…
Add table
Add a link
Reference in a new issue