Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update <Markdown> usage #571

Merged
merged 1 commit into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/content/2.writing/2.syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ There are a few things to know about it:
```vue [Components]
<!-- Alert -->
<div :class="[type]">
<Markdown unwrap="p" />
<Markdown :use="$slots.default" unwrap="p" />
</div>

<!-- Card -->
Expand All @@ -77,7 +77,7 @@ There are a few things to know about it:

{{ title }}

<Markdown use="description" unwrap="p" />
<Markdown :use="$slots.description" unwrap="p" />
</div>
```

Expand Down Expand Up @@ -109,7 +109,7 @@ There are a few things to know about it:

```vue [Component]
<div :class="[type]">
<Markdown unwrap="p" />
<Markdown :use="$slots.default" unwrap="p" />
</div>
```

Expand Down Expand Up @@ -140,7 +140,7 @@ There are a few things to know about it:

```vue [Component]
<div :class="[type]">
<Markdown unwrap="p" />
<Markdown :use="$slots.default" unwrap="p" />
</div>
```

Expand Down Expand Up @@ -186,7 +186,7 @@ There are a few things to know about it:

{{ title }}

<Markdown use="description" unwrap="p" />
<Markdown :use="$slots.description" unwrap="p" />
</div>
```

Expand Down
2 changes: 1 addition & 1 deletion packages/docs-theme/components/content/Alert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defineProps({
<div class="px-4 py-3 mt-4 mb-4 text-sm leading-relaxed alert rounded-xl" :class="[type]">
<div class="flex items-start">
<div class="flex-grow alert-content">
<Markdown unwrap="p" />
<Markdown :use="$slots.default" unwrap="p" />
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/docs-theme/components/content/BlockHero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ defineProps({
<Container padded class="my-16 flex flex-col lg:flex-row">
<div class="mb-8 flex flex-col items-center pr-0 lg:mb-0 lg:w-2/3 lg:items-start lg:pr-8">
<h2 class="mb-8 text-center text-5xl font-semibold tracking-tighter text-gray-900 dark:text-gray-100 sm:text-6xl sm:leading-none lg:text-left lg:text-7xl">
<Markdown use="title" unwrap="p" />
<Markdown :use="$slots.title" unwrap="p" />
</h2>

<p class="leading-base mb-8 text-center text-lg font-medium tracking-tight text-gray-700 dark:text-gray-300 sm:text-xl lg:text-left xl:text-xl">
<Markdown use="description" unwrap="p" />
<Markdown :use="$slots.description" unwrap="p" />
</p>

<div class="flex flex-col items-center space-y-4 sm:mb-4 sm:flex-row sm:space-y-0 sm:space-x-4 lg:space-x-6">
Expand Down
6 changes: 3 additions & 3 deletions packages/docs-theme/components/docs/DocsHero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ defineProps({
<UBadge rounded label="Warning" />

<span class="u-text-gray-500">
<Markdown unwrap="p" :use="$slots.badge" />
<Markdown :use="$slots.badge" unwrap="p" />
</span>
</div>
<h1 v-if="$slots.title" class="mb-0 text-center text-7xl font-bold">
<Markdown unwrap="p" :use="$slots.title" />
<Markdown :use="$slots.title" unwrap="p" />
</h1>
<p v-if="$slots.description" class="w-1/2 text-center text-lg">
<Markdown unwrap="p" :use="$slots.description" />
<Markdown :use="$slots.description" unwrap="p" />
</p>
<div class="flex gap-x-8">
<UButton
Expand Down
Loading