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

feat(ui-components): Add hover icon for external links in Sidebar #2706

Merged
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 packages/frontend-2/components/dashboard/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@

<LayoutSidebarMenuGroup title="Resources">
<NuxtLink :to="connectorsPageUrl" target="_blank">
<LayoutSidebarMenuGroupItem label="Connectors">
<LayoutSidebarMenuGroupItem label="Connectors" external>
<template #icon>
<IconConnectors class="h-4 w-4 text-foreground-2" />
</template>
</LayoutSidebarMenuGroupItem>
</NuxtLink>

<NuxtLink to="https://speckle.community/" target="_blank">
<LayoutSidebarMenuGroupItem label="Community forum">
<LayoutSidebarMenuGroupItem label="Community forum" external>
<template #icon>
<GlobeAltIcon class="h-5 w-5 text-foreground-2" />
</template>
Expand All @@ -99,15 +99,15 @@
to="https://docs.google.com/forms/d/e/1FAIpQLSeTOU8i0KwpgBG7ONimsh4YMqvLKZfSRhWEOz4W0MyjQ1lfAQ/viewform"
target="_blank"
>
<LayoutSidebarMenuGroupItem label="Give us feedback">
<LayoutSidebarMenuGroupItem label="Give us feedback" external>
<template #icon>
<ChatBubbleLeftIcon class="h-5 w-5 text-foreground-2" />
</template>
</LayoutSidebarMenuGroupItem>
</NuxtLink>

<NuxtLink to="https://speckle.guide/" target="_blank">
<LayoutSidebarMenuGroupItem label="Documentation">
<LayoutSidebarMenuGroupItem label="Documentation" external>
<template #icon>
<BriefcaseIcon class="h-5 w-5 text-foreground-2" />
</template>
Expand All @@ -118,7 +118,7 @@
to="https://speckle.community/c/making-speckle/changelog"
target="_blank"
>
<LayoutSidebarMenuGroupItem label="Changelog">
<LayoutSidebarMenuGroupItem label="Changelog" external>
<template #icon>
<ClockIcon class="h-5 w-5 text-foreground-2" />
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const Dashboard: StoryObj = {
<LayoutSidebarMenuGroupItem label="Group Item with no Icon" to="/" />
<LayoutSidebarMenuGroupItem label="Group Item with Child" to="/">
<LayoutSidebarMenuGroupItem label="Group Item child with Child" to="/">
<LayoutSidebarMenuGroupItem label="Group Item child" to="/">
<LayoutSidebarMenuGroupItem label="Group Item child" to="/" external>
<template #icon>
<HomeIcon class="h-5 w-5" />
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
<span :class="$slots.icon ? '' : 'pl-2'">
{{ label }}
</span>
<ArrowUpRightIcon
v-if="external"
class="h-2.5 w-2.5 !stroke-[3px] -ml-1 -mt-1.5 opacity-0 group-hover:opacity-100"
/>
</div>
<div
v-if="tag"
Expand Down Expand Up @@ -49,6 +53,7 @@
<script setup lang="ts">
import { ref, useSlots } from 'vue'
import Arrow from '~~/src/components/layout/sidebar/menu/group/Arrow.vue'
import { ArrowUpRightIcon } from '@heroicons/vue/24/outline'

const props = defineProps<{
label: string
Expand Down