Skip to content

Commit

Permalink
fix notification counter page
Browse files Browse the repository at this point in the history
  • Loading branch information
aotearoan committed Jul 14, 2020
1 parent 839a950 commit 7d58fe1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aotearoan/neon",
"description": "Neon is a design library of components for use with VueJS. It supports light and dark modes and can be extended to support multiple themes",
"version": "0.20.1",
"version": "0.20.2",
"main": "dist/@aotearoan/neon.umd.js",
"types": "dist/@aotearoan/components.d.ts",
"files": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
import { Component, Vue } from 'vue-property-decorator';
import { NeonCard, NeonCardBody, NeonCardHeader, NeonNotificationCounter } from '../../../../components';
import { NeonNotificationCounter } from '../../../../components';
import ComponentDocumentation from '../../../components/component-documentation/ComponentDocumentation.vue';
import { Menu, MenuModel } from '../../../Menu';

@Component({
components: {
NeonCard,
NeonCardHeader,
NeonCardBody,
NeonNotificationCounter,
ComponentDocumentation,
},
})
export default class NotificationCounter extends Vue {
private example = `<div>
private menuModel: MenuModel | null = null;

private example = `<div class="collection">
<span class="positioned-element">No value<neon-notification-counter /></span>
<span class="positioned-element">With value<neon-notification-counter count="9" /></span>
<span class="positioned-element">Large number<neon-notification-counter count="42" /></span>
</div>`;

private examples = [
{
title: 'Notification counters',
template: this.example,
},
];

public mounted() {
this.menuModel = Menu.getComponentConfig('NeonNotificationCounter');
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
<template>
<div>
<neon-card>
<neon-card-header>
<h1>Notification Counter</h1>
</neon-card-header>
<neon-card-body>
<p>
Place a <span class="neon-monospaced">NeonNotificationCounter</span> inside a positioned flex element and it
will position the styled counter in the top right hand corner if the parent.
</p>
</neon-card-body>
</neon-card>
<example title="Examples" :template="example"></example>
</div>
<component-documentation v-if="menuModel" :examples="examples" :model="menuModel">
<p>
Place a <span class="neon-monospaced">NeonNotificationCounter</span> inside a positioned flex element and it will
position the styled counter in the top right hand corner if the parent.
</p>
</component-documentation>
</template>

<script lang="ts" src="./NotificationCounter.ts"></script>

0 comments on commit 7d58fe1

Please sign in to comment.