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

[CHEC-1160] Add ping highlight dot to navigation #402

Merged
merged 3 commits into from Jan 13, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/components/ChecNavigation.vue
Expand Up @@ -75,6 +75,7 @@
>
<ChecNavIcon :icon="section.icon" />
</ChecButton>
<Ping v-if="section.ping" />
</li>
</ul>
<div @mouseover="() => handleOpenSection(user)">
Expand All @@ -101,6 +102,7 @@ import ChecLogo from '@/assets/svgs/chec-logo.svg';
import ChecNavIcon from '@/components/ChecNavIcon';
import ChecButton from '@/components/ChecButton';
import ChecIcon from '@/components/ChecIcon';
import Ping from './ChecNavigation/Ping.vue';

export default {
name: 'ChecNavigation',
Expand All @@ -110,6 +112,7 @@ export default {
ChecAvatar,
ChecLogo,
ChecNavIcon,
Ping,
},
props: {
/**
Expand Down
27 changes: 27 additions & 0 deletions src/components/ChecNavigation/Ping.vue
@@ -0,0 +1,27 @@
<template>
<span class="chec-navigation__ping">
<span class="chec-navigation__ping-outer" />
<span class="chec-navigation__ping-inner" />
</span>
</template>

<script>
export default {
name: 'Ping',
};
</script>

<style lang="scss">
.chec-navigation__ping {
@apply flex h-3 w-3 relative -ml-5 -mt-5 pointer-events-none;

&-inner {
@apply relative inline-flex rounded-full h-3 w-3 bg-green-400;
}

&-outer {
@apply animate-ping absolute inline-flex h-full w-full rounded-full bg-green-300 opacity-75;
animation-duration: 3s;
}
}
</style>
1 change: 1 addition & 0 deletions src/stories/components/ChecNavigation.stories.mdx
Expand Up @@ -66,6 +66,7 @@ the order of the "tree" that it is given
{
label: 'Products',
icon: 'products',
ping: true,
links: [
{
label: 'Products',
Expand Down