Refactored badge exports

pull/800/head
Cagatay Civici 2020-12-10 15:22:27 +03:00
parent f97f4bc9fc
commit 275beeae16
6 changed files with 22 additions and 11 deletions

3
exports/badge.d.ts vendored
View File

@ -1,2 +1 @@
export * from './components/badge/Badge';
export * from './components/badge/BadgeDirective';
export * from './components/badge/Badge';

View File

@ -1,3 +1,2 @@
'use strict';
module.exports.Badge = require('./components/badge/Badge.vue');
module.exports.BadgeDirective = require('./components/badge/BadgeDirective.js');
module.exports = require('./components/badge/Badge.vue');

View File

@ -0,0 +1 @@
export * from './components/badge/BadgeDirective';

View File

@ -0,0 +1,2 @@
'use strict';
module.exports.BadgeDirective = require('./components/badge/BadgeDirective.js');

View File

@ -0,0 +1,5 @@
import Directive from 'vue';
declare interface BadgeDirective extends Directive {}
export default BadgeDirective;

View File

@ -2,17 +2,16 @@
<div class="content-section documentation">
<TabView>
<TabPanel header="Documentation">
<h5>Import</h5>
<pre v-code.script>
<code>
import {Badge,BadgeDirective} from 'primevue/badge';
</code></pre>
<h5>Getting Started</h5>
<p>Badge can either be used as a standalone component or as a directive.</p>
<h6>Component</h6>
<pre v-code.script>
<code>
import Badge from 'primevue/badge';
</code></pre>
<p>Content of the badge is specified using the <i>value</i> property.</p>
<pre v-code>
<code>
@ -21,6 +20,12 @@ import {Badge,BadgeDirective} from 'primevue/badge';
</code></pre>
<h6>Directive</h6>
<pre v-code.script>
<code>
import BadgeDirective from 'primevue/badgedirective';
</code></pre>
<p>When used as a directive, badge needs to be configured at the application with a name of your choice.</p>
<pre v-code.script>
<code>