Skip to content

Commit

Permalink
Merge pull request #402 from chec/feature/nav-ping
Browse files Browse the repository at this point in the history
  • Loading branch information
ScopeyNZ committed Jan 13, 2021
2 parents 7913e02 + eeb1bd6 commit 970727c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
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

0 comments on commit 970727c

Please sign in to comment.