Add mitt doc

pull/496/head
Cagatay Civici 2020-09-23 14:56:24 +03:00
parent 0befe4ebe8
commit ac7ee76682
4 changed files with 23 additions and 11 deletions

View File

@ -52,12 +52,10 @@
"primeicons": "4.0.0", "primeicons": "4.0.0",
"prismjs": "^1.15.0", "prismjs": "^1.15.0",
"quill": "1.3.3", "quill": "1.3.3",
"mitt": "^2.1.0",
"@fullcalendar/core": "4.0.2", "@fullcalendar/core": "4.0.2",
"@fullcalendar/daygrid": "4.0.1", "@fullcalendar/daygrid": "4.0.1",
"@fullcalendar/interaction": "4.0.2", "@fullcalendar/interaction": "4.0.2",
"@fullcalendar/timegrid": "4.0.1" "@fullcalendar/timegrid": "4.0.1"
},
"dependencies": {
"mitt": "^2.1.0"
} }
} }

View File

@ -97,6 +97,10 @@ dependencies: {
<td>PrimeFlex</td> <td>PrimeFlex</td>
<td>DataView</td> <td>DataView</td>
</tr> </tr>
<tr>
<td>Mitt</td>
<td>Toast and Terminal</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>

View File

@ -2,6 +2,12 @@
<div class="content-section documentation"> <div class="content-section documentation">
<TabView> <TabView>
<TabPanel header="Documentation"> <TabPanel header="Documentation">
<h5>Mitt EventBus</h5>
<p>Terminal requires <a href="https://www.npmjs.com/package/mitt">Mitt</a>, a tiny 200b EventBus implementation.</p>
<CodeHighlight>
npm install mitt --save
</CodeHighlight>
<h5>Import</h5> <h5>Import</h5>
<CodeHighlight lang="javascript"> <CodeHighlight lang="javascript">
import Terminal from 'primevue/terminal'; import Terminal from 'primevue/terminal';
@ -120,7 +126,7 @@ export default {
</div> </div>
<h5>Dependencies</h5> <h5>Dependencies</h5>
<p>None.</p> <p>Mitt.</p>
</TabPanel> </TabPanel>
<TabPanel header="Source"> <TabPanel header="Source">

View File

@ -2,18 +2,21 @@
<div class="content-section documentation"> <div class="content-section documentation">
<TabView> <TabView>
<TabPanel header="Documentation"> <TabPanel header="Documentation">
<h5>Mitt EventBus</h5>
<p>Toast requires <a href="https://www.npmjs.com/package/mitt">Mitt</a>, a tiny 200b EventBus implementation.</p>
<CodeHighlight>
npm install mitt --save
</CodeHighlight>
<h5>ToastService</h5> <h5>ToastService</h5>
<p>Toast messages are dynamically created using a <i>ToastService</i> that needs to be installed globally before the application <p>Toast messages are dynamically created using a <i>ToastService</i> that needs to be installed globally before the application
instance is created.</p> instance is created.</p>
<CodeHighlight lang="javascript"> <CodeHighlight lang="javascript">
import {createApp} from 'vue';
import ToastService from 'primevue/toastservice'; import ToastService from 'primevue/toastservice';
Vue.use(ToastService);
//example application instance const app = createApp(App);
new Vue({ app.use(ToastService);
router,
render: h => h(App)
}).$mount('#app');
</CodeHighlight> </CodeHighlight>
<h5>Import</h5> <h5>Import</h5>
@ -21,6 +24,7 @@ new Vue({
import Toast from 'primevue/toast'; import Toast from 'primevue/toast';
</CodeHighlight> </CodeHighlight>
<h5>Getting Started</h5> <h5>Getting Started</h5>
<p>Ideal location of a Toast is the main application template so that it can be used by any component within the application.</p> <p>Ideal location of a Toast is the main application template so that it can be used by any component within the application.</p>
@ -243,7 +247,7 @@ this.$toast.removeAllGroups();
</div> </div>
<h5>Dependencies</h5> <h5>Dependencies</h5>
<p>None.</p> <p>Mitt.</p>
</TabPanel> </TabPanel>
<TabPanel header="Source"> <TabPanel header="Source">