2019-03-28 08:22:25 +00:00
|
|
|
<template>
|
|
|
|
<div class="content-section documentation">
|
|
|
|
<TabView>
|
|
|
|
<TabPanel header="Documentation">
|
2020-06-17 19:29:33 +00:00
|
|
|
<h5>Import</h5>
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code.script>
|
|
|
|
<code>
|
2019-03-28 08:22:25 +00:00
|
|
|
import Button from 'primevue/button';
|
2020-09-24 11:14:55 +00:00
|
|
|
|
|
|
|
</code></pre>
|
2019-03-28 08:22:25 +00:00
|
|
|
|
2020-06-17 19:29:33 +00:00
|
|
|
<h5>Getting Started</h5>
|
2019-03-28 08:22:25 +00:00
|
|
|
<p>Button is created using the Button element.</p>
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code>
|
|
|
|
<code>
|
2019-03-28 08:22:25 +00:00
|
|
|
<Button />
|
2020-09-24 11:14:55 +00:00
|
|
|
|
|
|
|
</code></pre>
|
2019-03-28 08:22:25 +00:00
|
|
|
|
2020-06-17 19:29:33 +00:00
|
|
|
<h5>Label</h5>
|
2019-03-28 08:22:25 +00:00
|
|
|
<p>Text of the button is defined using the <i>label</i> property.</p>
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code>
|
|
|
|
<code>
|
2020-05-04 23:13:04 +00:00
|
|
|
<Button label="Submit" />
|
2020-09-24 11:14:55 +00:00
|
|
|
|
|
|
|
</code></pre>
|
2020-06-17 19:29:33 +00:00
|
|
|
<h5>Icons</h5>
|
2019-03-28 08:22:25 +00:00
|
|
|
<p>Icon on a button is specified with <i>icon</i> property and position is configured using <i>iconPos</i> attribute. Default
|
2019-05-23 08:24:32 +00:00
|
|
|
icon position is "left" and alternative is "right". To display only an icon, leave the label as undefined.</p>
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code>
|
|
|
|
<code>
|
2020-05-04 23:13:04 +00:00
|
|
|
<Button label="Submit" icon="pi pi-check" iconPos="right" />
|
2020-09-24 11:14:55 +00:00
|
|
|
|
|
|
|
</code></pre>
|
2019-03-28 08:22:25 +00:00
|
|
|
|
2020-06-17 19:29:33 +00:00
|
|
|
<h5>Events</h5>
|
2019-03-28 08:22:25 +00:00
|
|
|
<p>Events are defined with the standard notation.</p>
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code>
|
|
|
|
<code>
|
2020-05-04 23:13:04 +00:00
|
|
|
<Button label="Submit" @click="handleClick($event)"/>
|
2020-09-24 11:14:55 +00:00
|
|
|
|
|
|
|
</code></pre>
|
2019-03-28 08:22:25 +00:00
|
|
|
|
2020-06-17 19:29:33 +00:00
|
|
|
<h5>Severity</h5>
|
2020-05-08 20:56:59 +00:00
|
|
|
<p>Different options are available as severity levels.</p>
|
2019-03-28 08:22:25 +00:00
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>.p-button-secondary</li>
|
|
|
|
<li>.p-button-success</li>
|
|
|
|
<li>.p-button-info</li>
|
|
|
|
<li>.p-button-warning</li>
|
2020-06-17 09:22:15 +00:00
|
|
|
<li>.p-button-help</li>
|
2019-03-28 08:22:25 +00:00
|
|
|
<li>.p-button-danger</li>
|
|
|
|
</ul>
|
|
|
|
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code>
|
|
|
|
<code>
|
2019-05-22 16:30:18 +00:00
|
|
|
<Button label="Primary" />
|
|
|
|
<Button label="Secondary" class="p-button-secondary" />
|
|
|
|
<Button label="Success" class="p-button-success" />
|
|
|
|
<Button label="Info" class="p-button-info" />
|
|
|
|
<Button label="Warning" class="p-button-warning" />
|
2020-06-17 09:22:15 +00:00
|
|
|
<Button label="Warning" class="p-button-help" />
|
2019-05-22 16:30:18 +00:00
|
|
|
<Button label="Danger" class="p-button-danger" />
|
2020-09-24 11:14:55 +00:00
|
|
|
|
|
|
|
</code></pre>
|
2020-07-18 12:40:00 +00:00
|
|
|
|
|
|
|
<h5>Text Buttons</h5>
|
|
|
|
<p>Text buttons have transparent background and borders, use <i>p-button-text</i> to apply text button styling. In addition when used with <i>.p-button-plain</i>
|
|
|
|
text buttons ignore severity levels and displayed as a regular text.</p>
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code>
|
|
|
|
<code>
|
2020-07-18 12:40:00 +00:00
|
|
|
<Button label="Submit" class="p-button-text" />
|
|
|
|
<Button icon="pi pi-check" class="p-button-text" />
|
|
|
|
<Button label="Cancel" icon="pi pi-times" class="p-button-text" />
|
|
|
|
<Button label="Search" icon="pi pi-search" iconPos="right" class="p-button-text p-button-text" />
|
2020-09-24 11:14:55 +00:00
|
|
|
|
|
|
|
</code></pre>
|
2019-03-28 08:22:25 +00:00
|
|
|
|
2020-06-17 19:29:33 +00:00
|
|
|
<h5>Raised and Rounded Buttons</h5>
|
2019-03-28 08:22:25 +00:00
|
|
|
<p>A button can be raised by having "p-button-raised" style class and similarly borders can be made rounded using "p-button-rounded" class.</p>
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code>
|
|
|
|
<code>
|
2019-05-22 16:30:18 +00:00
|
|
|
<Button label="Primary" class="p-button-raised p-button-rounded" />
|
2020-09-24 11:14:55 +00:00
|
|
|
|
|
|
|
</code></pre>
|
2020-06-20 10:56:36 +00:00
|
|
|
|
|
|
|
<h5>Outlined Buttons</h5>
|
|
|
|
<p>An alternate styling for a button is the outlined option where background becomes transparent. Apply "p-button-outlined" to style a button as outlined.</p>
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code>
|
|
|
|
<code>
|
2020-06-20 10:56:36 +00:00
|
|
|
<Button label="Primary" class="p-button-outlined" />
|
2020-09-24 11:14:55 +00:00
|
|
|
|
|
|
|
</code></pre>
|
2020-04-28 09:34:12 +00:00
|
|
|
|
2020-06-17 19:29:33 +00:00
|
|
|
<h5>Link Buttons</h5>
|
2020-05-08 20:56:59 +00:00
|
|
|
<p>Use "p-button-link" class to render the button as a link.</p>
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code>
|
|
|
|
<code>
|
2020-05-08 20:56:59 +00:00
|
|
|
<Button label="Link" class="p-button-link" />
|
2020-09-24 11:14:55 +00:00
|
|
|
|
|
|
|
</code></pre>
|
2020-05-09 09:16:10 +00:00
|
|
|
|
2020-06-17 19:29:33 +00:00
|
|
|
<h5>Badges</h5>
|
2020-05-09 09:16:10 +00:00
|
|
|
<p>Badge is a small status indicator for a button. Refer to the <router-link to="/badge">badge</router-link> documentation for available styling options.</p>
|
|
|
|
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code>
|
|
|
|
<code>
|
2020-05-09 09:16:10 +00:00
|
|
|
<Button type="button" label="Emails" badge="8" />
|
|
|
|
<Button type="button" label="Messages" icon="pi pi-users" class="p-button-warning" badge="8" badgeClass="p-badge-info" />
|
2020-09-24 11:14:55 +00:00
|
|
|
|
|
|
|
</code></pre>
|
2020-05-08 20:56:59 +00:00
|
|
|
|
2020-06-17 19:29:33 +00:00
|
|
|
<h5>ButtonSet</h5>
|
2020-04-28 09:34:12 +00:00
|
|
|
<p>Wrapping the buttons in a container having a <i>.p-buttonset</i> class, groups the buttons side to side.</p>
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code>
|
|
|
|
<code>
|
2020-04-28 09:34:12 +00:00
|
|
|
<span class="p-buttonset">
|
|
|
|
<Button label="Save" icon="pi pi-check" />
|
|
|
|
<Button label="Delete" icon="pi pi-trash" />
|
|
|
|
<Button label="Cancel" icon="pi pi-times" />
|
|
|
|
</span>
|
2020-09-24 11:14:55 +00:00
|
|
|
|
|
|
|
</code></pre>
|
2020-05-10 20:36:57 +00:00
|
|
|
|
2020-06-17 19:29:33 +00:00
|
|
|
<h5>Sizes</h5>
|
2020-05-10 20:36:57 +00:00
|
|
|
<p>2 more sizes are available in addition to a regular button, for a smaller input add <i>p-button-sm</i> and for a larger one, use <i>p-button-lg</i>.
|
|
|
|
Note that these classes available to change the size of a particular button, for global scaling see the <router-link to="/theming">theming</router-link> page.</p>
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code>
|
|
|
|
<code>
|
2020-05-10 20:36:57 +00:00
|
|
|
<Button label="Small" icon="pi pi-check" class="p-button-sm" />
|
|
|
|
<Button label="Normal" icon="pi pi-check" class="p-button" />
|
|
|
|
<Button label="Large" icon="pi pi-check" class="p-button-lg" />
|
2020-09-24 11:14:55 +00:00
|
|
|
|
|
|
|
</code></pre>
|
2019-03-28 08:22:25 +00:00
|
|
|
|
2020-07-18 11:50:48 +00:00
|
|
|
<h5>Slot</h5>
|
|
|
|
<p>Custom content can be placed inside the button via the default slot. Note that when slot is used, label, icon and badge properties are not included.</p>
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code>
|
|
|
|
<code>
|
2020-07-18 11:50:48 +00:00
|
|
|
<Button>
|
|
|
|
Custom Content
|
|
|
|
</Button>
|
2020-09-24 11:14:55 +00:00
|
|
|
|
|
|
|
</code></pre>
|
2020-07-18 11:50:48 +00:00
|
|
|
|
2020-06-17 19:29:33 +00:00
|
|
|
<h5>Properties</h5>
|
2020-01-13 09:04:50 +00:00
|
|
|
<p>Any property such as style and class are passed to the underlying button element. Following are the additional properties to configure the component.</p>
|
2019-03-28 08:22:25 +00:00
|
|
|
<div class="doc-tablewrapper">
|
|
|
|
<table class="doc-table">
|
|
|
|
<thead>
|
2019-05-23 08:24:32 +00:00
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Type</th>
|
|
|
|
<th>Default</th>
|
|
|
|
<th>Description</th>
|
|
|
|
</tr>
|
2019-03-28 08:22:25 +00:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2019-05-23 08:24:32 +00:00
|
|
|
<tr>
|
|
|
|
<td>label</td>
|
|
|
|
<td>string</td>
|
|
|
|
<td>null</td>
|
|
|
|
<td>Text of the button.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>icon</td>
|
|
|
|
<td>string</td>
|
|
|
|
<td>null</td>
|
|
|
|
<td>Name of the icon.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>iconPos</td>
|
|
|
|
<td>string</td>
|
|
|
|
<td>left</td>
|
2020-05-09 14:26:33 +00:00
|
|
|
<td>Position of the icon, valid values are "left", "right", "bottom" and "top".</td>
|
2020-05-09 09:16:10 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>badge</td>
|
|
|
|
<td>string</td>
|
|
|
|
<td>null</td>
|
|
|
|
<td>Value of the badge.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>badgeClass</td>
|
|
|
|
<td>string</td>
|
2020-06-20 10:56:36 +00:00
|
|
|
<td>null</td>
|
2020-05-09 09:16:10 +00:00
|
|
|
<td>Style class of the badge.</td>
|
2019-05-23 08:24:32 +00:00
|
|
|
</tr>
|
2019-03-28 08:22:25 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
2020-06-17 19:29:33 +00:00
|
|
|
<h5>Styling</h5>
|
2019-03-28 08:22:25 +00:00
|
|
|
<p>Following is the list of structural style classes, for theming classes visit <router-link to="/theming">theming</router-link> page.</p>
|
|
|
|
<div class="doc-tablewrapper">
|
|
|
|
<table class="doc-table">
|
|
|
|
<thead>
|
2020-04-28 09:34:12 +00:00
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Element</th>
|
|
|
|
</tr>
|
2019-03-28 08:22:25 +00:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2020-04-28 09:34:12 +00:00
|
|
|
<tr>
|
|
|
|
<td>p-button</td>
|
|
|
|
<td>Button element</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>p-button-icon</td>
|
|
|
|
<td>Icon element</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2020-07-01 16:29:34 +00:00
|
|
|
<td>p-button-label</td>
|
2020-04-28 09:34:12 +00:00
|
|
|
<td>Label element of the button</td>
|
2020-05-10 21:03:29 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>p-button-sm</td>
|
|
|
|
<td>Smaller button element</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>p-button-lg</td>
|
|
|
|
<td>Larger button element</td>
|
2020-04-28 09:34:12 +00:00
|
|
|
</tr>
|
2019-03-28 08:22:25 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
2020-06-17 19:29:33 +00:00
|
|
|
<h5>Dependencies</h5>
|
2019-03-28 08:22:25 +00:00
|
|
|
<p>None.</p>
|
|
|
|
</TabPanel>
|
|
|
|
|
|
|
|
<TabPanel header="Source">
|
2021-01-05 10:44:54 +00:00
|
|
|
<div class="p-d-flex p-jc-between">
|
|
|
|
<a href="https://github.com/primefaces/primevue/tree/master/src/views/button" class="btn-viewsource" target="_blank" rel="noopener noreferrer">
|
|
|
|
<span>View on GitHub</span>
|
|
|
|
</a>
|
|
|
|
<LiveEditor name="ButtonDemo" :sources="sources"/>
|
|
|
|
</div>
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code>
|
|
|
|
<code><template v-pre>
|
2020-07-23 13:26:43 +00:00
|
|
|
<h5>Basic</h5>
|
|
|
|
<Button label="Submit" />
|
|
|
|
<Button label="Disabled" disabled="disabled" />
|
|
|
|
<Button label="Link" class="p-button-link" />
|
|
|
|
|
|
|
|
<h5>Icons</h5>
|
|
|
|
<Button icon="pi pi-check" />
|
|
|
|
<Button label="Submit" icon="pi pi-check" />
|
|
|
|
<Button label="Submit" icon="pi pi-check" iconPos="right" />
|
|
|
|
|
|
|
|
<h5>Severities</h5>
|
|
|
|
<Button label="Primary" />
|
|
|
|
<Button label="Secondary" class="p-button-secondary" />
|
|
|
|
<Button label="Success" class="p-button-success" />
|
|
|
|
<Button label="Info" class="p-button-info" />
|
|
|
|
<Button label="Warning" class="p-button-warning" />
|
|
|
|
<Button label="Help" class="p-button-help" />
|
|
|
|
<Button label="Danger" class="p-button-danger" />
|
|
|
|
|
|
|
|
<h5>Raised Buttons</h5>
|
|
|
|
<Button label="Primary" class="p-button-raised" />
|
|
|
|
<Button label="Secondary" class="p-button-raised p-button-secondary" />
|
|
|
|
<Button label="Success" class="p-button-raised p-button-success" />
|
|
|
|
<Button label="Info" class="p-button-raised p-button-info" />
|
|
|
|
<Button label="Warning" class="p-button-raised p-button-warning" />
|
|
|
|
<Button label="Help" class="p-button-raised p-button-help" />
|
|
|
|
<Button label="Danger" class="p-button-raised p-button-danger" />
|
|
|
|
|
|
|
|
<h5>Rounded Buttons</h5>
|
|
|
|
<Button label="Primary" class="p-button-rounded" />
|
|
|
|
<Button label="Secondary" class="p-button-rounded p-button-secondary" />
|
|
|
|
<Button label="Success" class="p-button-rounded p-button-success" />
|
|
|
|
<Button label="Info" class="p-button-rounded p-button-info" />
|
|
|
|
<Button label="Warning" class="p-button-rounded p-button-warning" />
|
|
|
|
<Button label="Help" class="p-button-rounded p-button-help" />
|
|
|
|
<Button label="Danger" class="p-button-rounded p-button-danger" />
|
|
|
|
|
|
|
|
<h5>Text Buttons</h5>
|
|
|
|
<Button label="Primary" class="p-button-text" />
|
|
|
|
<Button label="Secondary" class="p-button-secondary p-button-text" />
|
|
|
|
<Button label="Success" class="p-button-success p-button-text" />
|
|
|
|
<Button label="Info" class="p-button-info p-button-text" />
|
|
|
|
<Button label="Warning" class="p-button-warning p-button-text" />
|
|
|
|
<Button label="Help" class="p-button-help p-button-text" />
|
|
|
|
<Button label="Danger" class="p-button-danger p-button-text" />
|
|
|
|
<Button label="Plain" class="p-button-text p-button-plain" />
|
|
|
|
|
|
|
|
<h5>Raised Text Buttons</h5>
|
|
|
|
<Button label="Primary" class="p-button-raised p-button-text" />
|
|
|
|
<Button label="Secondary" class="p-button-raised p-button-secondary p-button-text" />
|
|
|
|
<Button label="Success" class="p-button-raised p-button-success p-button-text" />
|
|
|
|
<Button label="Info" class="p-button-raised p-button-info p-button-text" />
|
|
|
|
<Button label="Warning" class="p-button-raised p-button-warning p-button-text" />
|
|
|
|
<Button label="Help" class="p-button-raised p-button-help p-button-text" />
|
|
|
|
<Button label="Danger" class="p-button-raised p-button-danger p-button-text" />
|
|
|
|
<Button label="Plain" class="p-button-raised p-button-text p-button-plain" />
|
|
|
|
|
|
|
|
<h5>Outlined Buttons</h5>
|
|
|
|
<Button label="Primary" class="p-button-outlined" />
|
|
|
|
<Button label="Secondary" class="p-button-outlined p-button-secondary" />
|
|
|
|
<Button label="Success" class="p-button-outlined p-button-success" />
|
|
|
|
<Button label="Info" class="p-button-outlined p-button-info" />
|
|
|
|
<Button label="Warning" class="p-button-outlined p-button-warning" />
|
|
|
|
<Button label="Help" class="p-button-outlined p-button-help" />
|
|
|
|
<Button label="Danger" class="p-button-outlined p-button-danger" />
|
|
|
|
|
|
|
|
<h5>Rounded Icon Buttons</h5>
|
|
|
|
<Button icon="pi pi-bookmark" class="p-button-rounded p-button-secondary" />
|
|
|
|
<Button icon="pi pi-search" class="p-button-rounded p-button-success" />
|
|
|
|
<Button icon="pi pi-user" class="p-button-rounded p-button-info" />
|
|
|
|
<Button icon="pi pi-bell" class="p-button-rounded p-button-warning" />
|
|
|
|
<Button icon="pi pi-heart" class="p-button-rounded p-button-help" />
|
|
|
|
<Button icon="pi pi-times" class="p-button-rounded p-button-danger" />
|
|
|
|
<Button icon="pi pi-check" class="p-button-rounded" />
|
|
|
|
|
|
|
|
<h5>Rounded Text Icon Buttons</h5>
|
|
|
|
<Button icon="pi pi-check" class="p-button-rounded p-button-text" />
|
|
|
|
<Button icon="pi pi-bookmark" class="p-button-rounded p-button-secondary p-button-text" />
|
|
|
|
<Button icon="pi pi-search" class="p-button-rounded p-button-success p-button-text" />
|
|
|
|
<Button icon="pi pi-user" class="p-button-rounded p-button-info p-button-text" />
|
|
|
|
<Button icon="pi pi-bell" class="p-button-rounded p-button-warning p-button-text" />
|
|
|
|
<Button icon="pi pi-heart" class="p-button-rounded p-button-help p-button-text" />
|
|
|
|
<Button icon="pi pi-times" class="p-button-rounded p-button-danger p-button-text" />
|
|
|
|
<Button icon="pi pi-filter" class="p-button-rounded p-button-text p-button-plain" />
|
|
|
|
|
|
|
|
<h5>Rounded and Outlined Icon Buttons</h5>
|
|
|
|
<Button icon="pi pi-check" class="p-button-rounded p-button-outlined" />
|
|
|
|
<Button icon="pi pi-bookmark" class="p-button-rounded p-button-secondary p-button-outlined" />
|
|
|
|
<Button icon="pi pi-search" class="p-button-rounded p-button-success p-button-outlined" />
|
|
|
|
<Button icon="pi pi-user" class="p-button-rounded p-button-info p-button-outlined" />
|
|
|
|
<Button icon="pi pi-bell" class="p-button-rounded p-button-warning p-button-outlined" />
|
|
|
|
<Button icon="pi pi-heart" class="p-button-rounded p-button-help p-button-outlined" />
|
|
|
|
<Button icon="pi pi-times" class="p-button-rounded p-button-danger p-button-outlined" />
|
|
|
|
|
|
|
|
<h5>Badges</h5>
|
|
|
|
<Button type="button" label="Emails" badge="8" />
|
|
|
|
<Button type="button" label="Messages" icon="pi pi-users" class="p-button-warning" badge="8" badgeClass="p-badge-danger" />
|
|
|
|
|
|
|
|
<h5>Button Set</h5>
|
|
|
|
<span class="p-buttonset">
|
|
|
|
<Button label="Save" icon="pi pi-check" />
|
|
|
|
<Button label="Delete" icon="pi pi-trash" />
|
|
|
|
<Button label="Cancel" icon="pi pi-times" />
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<h5>Sizes</h5>
|
|
|
|
<div class="sizes">
|
|
|
|
<Button label="Small" icon="pi pi-check" class="p-button-sm" />
|
|
|
|
<Button label="Normal" icon="pi pi-check" class="p-button" />
|
|
|
|
<Button label="Large" icon="pi pi-check" class="p-button-lg" />
|
|
|
|
</div>
|
2019-03-28 08:22:25 +00:00
|
|
|
</template>
|
2020-09-24 11:14:55 +00:00
|
|
|
</code></pre>
|
2019-03-28 08:22:25 +00:00
|
|
|
|
2020-09-24 11:14:55 +00:00
|
|
|
<pre v-code.css>
|
|
|
|
<code>
|
2019-03-28 08:22:25 +00:00
|
|
|
button {
|
2020-05-14 08:51:13 +00:00
|
|
|
margin-right: .5rem;
|
2019-03-28 08:22:25 +00:00
|
|
|
}
|
2020-09-24 11:14:55 +00:00
|
|
|
|
|
|
|
</code></pre>
|
2019-03-28 08:22:25 +00:00
|
|
|
</TabPanel>
|
|
|
|
</TabView>
|
|
|
|
</div>
|
2021-01-05 10:44:54 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import LiveEditor from '../liveeditor/LiveEditor';
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
sources: {
|
|
|
|
'template': {
|
|
|
|
content: `<template>
|
|
|
|
<div class="layout-content">
|
|
|
|
<div class="content-section implementation">
|
|
|
|
<div class="card">
|
|
|
|
<h5>Basic</h5>
|
|
|
|
<Button label="Submit" />
|
|
|
|
<Button label="Disabled" disabled="disabled" />
|
|
|
|
<Button label="Link" class="p-button-link" />
|
|
|
|
|
|
|
|
<h5>Icons</h5>
|
|
|
|
<Button icon="pi pi-check" />
|
|
|
|
<Button label="Submit" icon="pi pi-check" />
|
|
|
|
<Button label="Submit" icon="pi pi-check" iconPos="right" />
|
|
|
|
|
|
|
|
<h5>Severities</h5>
|
|
|
|
<Button label="Primary" />
|
|
|
|
<Button label="Secondary" class="p-button-secondary" />
|
|
|
|
<Button label="Success" class="p-button-success" />
|
|
|
|
<Button label="Info" class="p-button-info" />
|
|
|
|
<Button label="Warning" class="p-button-warning" />
|
|
|
|
<Button label="Help" class="p-button-help" />
|
|
|
|
<Button label="Danger" class="p-button-danger" />
|
|
|
|
|
|
|
|
<h5>Raised Buttons</h5>
|
|
|
|
<Button label="Primary" class="p-button-raised" />
|
|
|
|
<Button label="Secondary" class="p-button-raised p-button-secondary" />
|
|
|
|
<Button label="Success" class="p-button-raised p-button-success" />
|
|
|
|
<Button label="Info" class="p-button-raised p-button-info" />
|
|
|
|
<Button label="Warning" class="p-button-raised p-button-warning" />
|
|
|
|
<Button label="Help" class="p-button-raised p-button-help" />
|
|
|
|
<Button label="Danger" class="p-button-raised p-button-danger" />
|
|
|
|
|
|
|
|
<h5>Rounded Buttons</h5>
|
|
|
|
<Button label="Primary" class="p-button-rounded" />
|
|
|
|
<Button label="Secondary" class="p-button-rounded p-button-secondary" />
|
|
|
|
<Button label="Success" class="p-button-rounded p-button-success" />
|
|
|
|
<Button label="Info" class="p-button-rounded p-button-info" />
|
|
|
|
<Button label="Warning" class="p-button-rounded p-button-warning" />
|
|
|
|
<Button label="Help" class="p-button-rounded p-button-help" />
|
|
|
|
<Button label="Danger" class="p-button-rounded p-button-danger" />
|
|
|
|
|
|
|
|
<h5>Text Buttons</h5>
|
|
|
|
<Button label="Primary" class="p-button-text" />
|
|
|
|
<Button label="Secondary" class="p-button-secondary p-button-text" />
|
|
|
|
<Button label="Success" class="p-button-success p-button-text" />
|
|
|
|
<Button label="Info" class="p-button-info p-button-text" />
|
|
|
|
<Button label="Warning" class="p-button-warning p-button-text" />
|
|
|
|
<Button label="Help" class="p-button-help p-button-text" />
|
|
|
|
<Button label="Danger" class="p-button-danger p-button-text" />
|
|
|
|
<Button label="Plain" class="p-button-text p-button-plain" />
|
|
|
|
|
|
|
|
<h5>Raised Text Buttons</h5>
|
|
|
|
<Button label="Primary" class="p-button-raised p-button-text" />
|
|
|
|
<Button label="Secondary" class="p-button-raised p-button-secondary p-button-text" />
|
|
|
|
<Button label="Success" class="p-button-raised p-button-success p-button-text" />
|
|
|
|
<Button label="Info" class="p-button-raised p-button-info p-button-text" />
|
|
|
|
<Button label="Warning" class="p-button-raised p-button-warning p-button-text" />
|
|
|
|
<Button label="Help" class="p-button-raised p-button-help p-button-text" />
|
|
|
|
<Button label="Danger" class="p-button-raised p-button-danger p-button-text" />
|
|
|
|
<Button label="Plain" class="p-button-raised p-button-text p-button-plain" />
|
|
|
|
|
|
|
|
<h5>Outlined Buttons</h5>
|
|
|
|
<Button label="Primary" class="p-button-outlined" />
|
|
|
|
<Button label="Secondary" class="p-button-outlined p-button-secondary" />
|
|
|
|
<Button label="Success" class="p-button-outlined p-button-success" />
|
|
|
|
<Button label="Info" class="p-button-outlined p-button-info" />
|
|
|
|
<Button label="Warning" class="p-button-outlined p-button-warning" />
|
|
|
|
<Button label="Help" class="p-button-outlined p-button-help" />
|
|
|
|
<Button label="Danger" class="p-button-outlined p-button-danger" />
|
|
|
|
|
|
|
|
<h5>Rounded Icon Buttons</h5>
|
|
|
|
<Button icon="pi pi-bookmark" class="p-button-rounded p-button-secondary" />
|
|
|
|
<Button icon="pi pi-search" class="p-button-rounded p-button-success" />
|
|
|
|
<Button icon="pi pi-user" class="p-button-rounded p-button-info" />
|
|
|
|
<Button icon="pi pi-bell" class="p-button-rounded p-button-warning" />
|
|
|
|
<Button icon="pi pi-heart" class="p-button-rounded p-button-help" />
|
|
|
|
<Button icon="pi pi-times" class="p-button-rounded p-button-danger" />
|
|
|
|
<Button icon="pi pi-check" class="p-button-rounded" />
|
|
|
|
|
|
|
|
<h5>Rounded Text Icon Buttons</h5>
|
|
|
|
<Button icon="pi pi-check" class="p-button-rounded p-button-text" />
|
|
|
|
<Button icon="pi pi-bookmark" class="p-button-rounded p-button-secondary p-button-text" />
|
|
|
|
<Button icon="pi pi-search" class="p-button-rounded p-button-success p-button-text" />
|
|
|
|
<Button icon="pi pi-user" class="p-button-rounded p-button-info p-button-text" />
|
|
|
|
<Button icon="pi pi-bell" class="p-button-rounded p-button-warning p-button-text" />
|
|
|
|
<Button icon="pi pi-heart" class="p-button-rounded p-button-help p-button-text" />
|
|
|
|
<Button icon="pi pi-times" class="p-button-rounded p-button-danger p-button-text" />
|
|
|
|
<Button icon="pi pi-filter" class="p-button-rounded p-button-text p-button-plain" />
|
|
|
|
|
|
|
|
<h5>Rounded and Outlined Icon Buttons</h5>
|
|
|
|
<Button icon="pi pi-check" class="p-button-rounded p-button-outlined" />
|
|
|
|
<Button icon="pi pi-bookmark" class="p-button-rounded p-button-secondary p-button-outlined" />
|
|
|
|
<Button icon="pi pi-search" class="p-button-rounded p-button-success p-button-outlined" />
|
|
|
|
<Button icon="pi pi-user" class="p-button-rounded p-button-info p-button-outlined" />
|
|
|
|
<Button icon="pi pi-bell" class="p-button-rounded p-button-warning p-button-outlined" />
|
|
|
|
<Button icon="pi pi-heart" class="p-button-rounded p-button-help p-button-outlined" />
|
|
|
|
<Button icon="pi pi-times" class="p-button-rounded p-button-danger p-button-outlined" />
|
|
|
|
|
|
|
|
<h5>Badges</h5>
|
|
|
|
<Button type="button" label="Emails" badge="8" />
|
|
|
|
<Button type="button" label="Messages" icon="pi pi-users" class="p-button-warning" badge="8" badgeClass="p-badge-danger" />
|
|
|
|
|
|
|
|
<h5>Button Set</h5>
|
|
|
|
<span class="p-buttonset">
|
|
|
|
<Button label="Save" icon="pi pi-check" />
|
|
|
|
<Button label="Delete" icon="pi pi-trash" />
|
|
|
|
<Button label="Cancel" icon="pi pi-times" />
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<h5>Sizes</h5>
|
|
|
|
<div class="sizes">
|
|
|
|
<Button label="Small" icon="pi pi-check" class="p-button-sm" />
|
|
|
|
<Button label="Normal" icon="pi pi-check" class="p-button" />
|
|
|
|
<Button label="Large" icon="pi pi-check" class="p-button-lg" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<style>
|
|
|
|
.p-button {
|
|
|
|
margin-right: .5rem;
|
|
|
|
margin-bottom: .5rem;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
LiveEditor
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|