Skip to content

Commit

Permalink
chore: enhance Callout visually
Browse files Browse the repository at this point in the history
  • Loading branch information
one-aalam committed Dec 8, 2023
1 parent 807bfa0 commit 2ca4888
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/components/mdoc/Callout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ const COLOR_MAP: Record<CalloutType, string> = {
const { title, type = 'note' } = Astro.props
---
<div class="callout flex gap-2 w-full bg-gray-50 my-1 px-5 py-2 rounded-sm shadow-sm">
<Icon class={`w-8 h-8 inline-block ${COLOR_MAP[type]}`} pack="mdi" name={ICON_MAP[type]} />
<div class="callout flex gap-2 w-full bg-gray-200/75 dark:bg-gray-600/75 p-4 rounded-sm shadow-sm">
<Icon class={`w-6 h-6 inline-block ${COLOR_MAP[type]}`} pack="mdi" name={ICON_MAP[type]} />
<div class="copy flex flex-col">
<h3 class={`title m-0 ${COLOR_MAP[type]}`}>{title}</h3>
<h4 class={`title m-0 ${COLOR_MAP[type]}`}>{title}</h4>
<slot/>
</div>
</div>
17 changes: 11 additions & 6 deletions src/content/blog/markdoc-integration.mdoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,24 @@ or create custom components.
Astro Ink ships with the following tags with more coming soon...

### Callout
{% callout type="note" title="Note" %}
lorem ipsum doler sit amet
{% /callout %}

{% callout type="error" title="Error" %}
#### Note
{% callout type="note" title="title goes here..." %}
lorem ipsum doler sit amet lorem
{% /callout %}

#### Error
{% callout type="error" title="title goes here..." %}
lorem ipsum doler sit amet
{% /callout %}

{% callout type="warning" title="Warning" %}
#### Warning
{% callout type="warning" title="title goes here..." %}
lorem ipsum doler sit amet
{% /callout %}

{% callout type="check" title="Check" %}
#### Check
{% callout type="check" title="title goes here..." %}
lorem ipsum doler sit amet
{% /callout %}

Expand Down

1 comment on commit 2ca4888

@vercel
Copy link

@vercel vercel bot commented on 2ca4888 Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

astro-ink – ./

astro-ink.vercel.app
astro-ink-aalam.vercel.app
ilm.aalam.in
astro-ink-git-main-aalam.vercel.app

Please sign in to comment.