Skip to content

Commit 024673d

Browse files
committed
fix(docs): add btn classes for links
since as prop in button was removed for now only style <a> manually
1 parent bd42409 commit 024673d

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

docs/components/Docs/PrevNextBtns.vue

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script setup lang="ts">
22
import { computed } from 'vue'
3-
import { Button } from 'frappe-ui'
43
import { state } from '../../state'
54
import { useData, useRoute } from 'vitepress'
65
@@ -36,23 +35,27 @@ const nextLink = computed(() => {
3635
3736
return linkInfos[index + 1]
3837
})
38+
39+
const subtleMdLink =
40+
'inline-flex items-center gap-2 ' +
41+
'h-8 px-2.5 rounded ' +
42+
'text-base font-medium ' +
43+
'text-ink-gray-8 bg-surface-gray-2 ' +
44+
'hover:bg-surface-gray-3 active:bg-surface-gray-4 ' +
45+
'transition-colors ' +
46+
'focus:outline-none focus-visible:ring focus-visible:ring-outline-gray-3'
3947
</script>
4048

4149
<template>
4250
<div class="flex justify-between gap-5 mt-10" v-if="visible">
43-
<Button v-if="prevLink" as="a" :href="prevLink?.link">
44-
<template #prefix>
45-
<LucideLeft class="size-4" />
46-
</template>
47-
48-
{{ prevLink?.text }}
49-
</Button>
50-
51-
<Button as="a" v-if="nextLink" :href="nextLink?.link">
52-
{{ nextLink?.text }}
53-
<template #suffix>
54-
<LucideRight class="size-4" />
55-
</template>
56-
</Button>
51+
<a v-if="prevLink" :href="prevLink.link" :class="subtleMdLink">
52+
<LucideLeft class="h-4 w-4" />
53+
{{ prevLink.text }}
54+
</a>
55+
56+
<a v-if="nextLink" :href="nextLink.link" :class="subtleMdLink">
57+
{{ nextLink.text }}
58+
<LucideRight class="h-4 w-4" />
59+
</a>
5760
</div>
5861
</template>

docs/components/Home/Hero.vue

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<script setup lang="ts">
2-
import { Button } from 'frappe-ui'
32
import LucideRight from '~icons/lucide/arrow-right'
4-
53
</script>
64

75
<template>
@@ -19,12 +17,13 @@ import LucideRight from '~icons/lucide/arrow-right'
1917
</p>
2018

2119
<div class="flex gap-3 mt-2 mx-auto">
22-
<Button href="/docs/getting-started" as="a" variant='solid' size='md'>
20+
<a
21+
href="/docs/getting-started"
22+
class="inline-flex items-center gap-2 h-8 px-2.5 rounded text-base font-medium text-ink-white bg-surface-gray-7 hover:bg-surface-gray-6 active:bg-surface-gray-5 transition-colors focus:outline-none focus-visible:ring focus-visible:ring-outline-gray-3"
23+
>
2324
Get Started
24-
<template #suffix>
25-
<LucideRight class="size-4" />
26-
</template>
27-
</Button>
25+
<LucideRight class="h-4 w-4" />
26+
</a>
2827
</div>
2928
</div>
3029
</div>

0 commit comments

Comments
 (0)