Skip to content

Commit

Permalink
feat(block-hero): allow #actions slot
Browse files Browse the repository at this point in the history
  • Loading branch information
Tahul committed Jul 21, 2022
1 parent 79d58da commit 296cb26
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
17 changes: 10 additions & 7 deletions components/content/BlockHero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,16 @@ defineProps({
</div>

<div class="mt-6 flex flex-col items-center justify-center gap-4 sm:mt-10 sm:flex-row sm:gap-6 lg:justify-start">
<ButtonLink v-if="cta" class="!mb-0" bold size="large" :href="(cta[1] as any)">
{{ cta[0] }}
</ButtonLink>

<a v-if="secondary" :href="(secondary[1] as any)" class="u-text-gray-500 hover:u-text-gray-700 py-px font-medium">
{{ secondary[0] }}
</a>
<template v-if="!$slots.actions">
<ButtonLink v-if="cta" class="!mb-0" bold size="large" :href="(cta[1] as any)">
{{ cta[0] }}
</ButtonLink>

<a v-if="secondary" :href="(secondary[1] as any)" class="u-text-gray-500 hover:u-text-gray-700 py-px font-medium">
{{ secondary[0] }}
</a>
</template>
<Markdown v-else :use="$slots.actions" unwrap="p" />
</div>
</div>

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@
"dependencies": {
"@iconify/vue": "^3.2.1",
"@nuxt/content": "npm:@nuxt/content-edge@latest",
"@nuxt/kit": "^3.0.0-rc.5",
"@nuxt/kit": "^3.0.0-rc.6",
"@nuxthq/studio": "npm:@nuxthq/studio-edge@latest",
"@nuxtjs/color-mode": "^3.1.4",
"@nuxtjs/tailwindcss": "npm:@nuxtjs/tailwindcss-edge@latest",
"@tailwindcss/aspect-ratio": "^0.4.0",
"@tailwindcss/forms": "^0.5.2",
"@tailwindcss/line-clamp": "^0.4.0",
"@tailwindcss/typography": "^0.5.4",
"@vueuse/core": "^8.9.2",
"@vueuse/core": "^8.9.4",
"@vueuse/motion": "2.0.0-beta.12",
"@vueuse/nuxt": "^8.9.2",
"@vueuse/nuxt": "^8.9.4",
"browser-style-dictionary": "^3.1.1-browser.1",
"defu": "^6.0.0",
"@nuxt-themes/config": "npm:@nuxt-themes/config-edge@latest",
Expand All @@ -59,11 +59,11 @@
"@antfu/eslint-config": "^0.25.2",
"@docsearch/css": "^3.1.1",
"@docsearch/js": "^3.1.1",
"@nuxtjs/algolia": "^1.0.1",
"@nuxtjs/algolia": "^1.0.3",
"@nuxtjs/eslint-config-typescript": "^10.0.0",
"@nuxtlabs/github-module": "npm:@nuxtlabs/github-module-edge@latest",
"@types/tailwindcss": "^3.0.11",
"eslint": "^8.19.0",
"eslint": "^8.20.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier-vue": "^4.2.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@
socket.io-client "^4.5.1"
unstorage "^0.4.1"

"@nuxtjs/algolia@^1.0.1":
"@nuxtjs/algolia@^1.0.3":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@nuxtjs/algolia/-/algolia-1.0.3.tgz#fc6086990fe5e3e2d897251427e892aa1b9dd6a7"
integrity sha512-qB77R/9IkUqlBYtqeOe+Qk+IbyQC2kfXye0yW0fGIxeagKJkHyr2mw2iDw3I8Ws27e9qCsrdnM3BNdAmeNq7zA==
Expand Down Expand Up @@ -1619,7 +1619,7 @@
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.37.tgz#8e6adc3f2759af52f0e85863dfb0b711ecc5c702"
integrity sha512-4rSJemR2NQIo9Klm1vabqWjD8rs/ZaJSzMxkMNeJS6lHiUjjUeYFbooN19NgFjztubEKh3WlZUeOLVdbbUWHsw==

"@vueuse/[email protected]", "@vueuse/core@^8.0.1", "@vueuse/core@^8.9.2":
"@vueuse/[email protected]", "@vueuse/core@^8.0.1", "@vueuse/core@^8.9.4":
version "8.9.4"
resolved "https://registry.yarnpkg.com/@vueuse/core/-/core-8.9.4.tgz#c7db40f19390b3c9f4ff9294a30461497f62ec19"
integrity sha512-B/Mdj9TK1peFyWaPof+Zf/mP9XuGAngaJZBwPaXBvU3aCTZlx3ltlrFFFyMV4iGBwsjSCeUCgZrtkEj9dS2Y3Q==
Expand Down Expand Up @@ -1651,7 +1651,7 @@
style-value-types "^5.1.0"
vue-demi "*"

"@vueuse/nuxt@^8.9.2":
"@vueuse/nuxt@^8.9.4":
version "8.9.4"
resolved "https://registry.yarnpkg.com/@vueuse/nuxt/-/nuxt-8.9.4.tgz#22f14e23017f406d0bd37e9b4441483a1dd4277f"
integrity sha512-iA0/maD70161MYY7HjCGmxMd97LqiaDA5d7pZnuBe3Xanm6xetvbvYCLAlhigbTujfDUQcmD0qiHbNaXaIP5Xg==
Expand Down Expand Up @@ -3503,7 +3503,7 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.1.0, eslint-visitor-keys@^3.3
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==

eslint@^8.19.0:
eslint@^8.20.0:
version "8.20.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.20.0.tgz#048ac56aa18529967da8354a478be4ec0a2bc81b"
integrity sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==
Expand Down

0 comments on commit 296cb26

Please sign in to comment.