|
| 1 | +<example src="./examples/Buttons.vue" /> |
| 2 | +<example src="./examples/Lists.vue" /> |
| 3 | +<example src="./examples/Dense.vue" /> |
| 4 | + |
| 5 | +<template> |
| 6 | + <page-container centered :title="$t('pages.badge.title')"> |
| 7 | + <div class="page-container-section"> |
| 8 | + <p>Small status descriptors for UI elements.</p> |
| 9 | + </div> |
| 10 | + |
| 11 | + <div class="page-container-section"> |
| 12 | + |
| 13 | + <p>Some components like <b>button, avatar</b> needs to be wrapped with <code>md-badge</code> component.</p> |
| 14 | + <code-example title="Example with buttons" :component="examples['buttons']" /> |
| 15 | + |
| 16 | + <code-example title="Example with lists" :component="examples['lists']" /> |
| 17 | + |
| 18 | + <code-example title="Dense" :component="examples['dense']" /> |
| 19 | + |
| 20 | + <api-item title="API - md-badge"> |
| 21 | + <p>The following option can be applied to any badge:</p> |
| 22 | + |
| 23 | + <api-table :headings="props.headings" :props="props.props" slot="props" /> |
| 24 | + <api-table :headings="classes.headings" :props="classes.props" slot="classes" /> |
| 25 | + </api-item> |
| 26 | + </div> |
| 27 | + </page-container> |
| 28 | +</template> |
| 29 | + |
| 30 | +<script> |
| 31 | + import examples from 'docs-mixins/docsExample' |
| 32 | +
|
| 33 | + export default { |
| 34 | + name: 'DocBadge', |
| 35 | + mixins: [examples], |
| 36 | + data: () => ({ |
| 37 | + classes: { |
| 38 | + headings: ['Name', 'Description'], |
| 39 | + props: [ |
| 40 | + { |
| 41 | + name: 'md-square', |
| 42 | + description: 'Created square type badge.' |
| 43 | + } |
| 44 | + ] |
| 45 | + }, |
| 46 | + props: { |
| 47 | + headings: ['Name', 'Description', 'Default'], |
| 48 | + props: [ |
| 49 | + { |
| 50 | + name: 'md-content', |
| 51 | + type: 'String, Number', |
| 52 | + description: 'A content for badge' |
| 53 | + }, |
| 54 | + { |
| 55 | + name: 'md-position', |
| 56 | + type: 'String', |
| 57 | + description: 'Position of badge <code>top</code> or <code>bottom</code>', |
| 58 | + defaults: 'top' |
| 59 | + }, |
| 60 | + { |
| 61 | + name: 'md-dense', |
| 62 | + type: 'Boolean', |
| 63 | + description: 'Enables the dense layout', |
| 64 | + defaults: 'false' |
| 65 | + }, |
| 66 | + ] |
| 67 | + } |
| 68 | + }) |
| 69 | + } |
| 70 | +</script> |
0 commit comments