truly-ui
Version:
Web Components for Desktop Applications.
130 lines (123 loc) • 4.02 kB
HTML
<div class="router-outlet">
<div class="header-title-demo">
<h1 class="title">Form</h1>
<p class="text-content">The form component uses Modal, the difference between them is tabbing, and the default buttons that act as a submit form.</p>
<p class="text-content">The way of the form appears (fullscreen) on window is relative with the parent HTML element.</p>
</div>
<hr>
<div class="showcase">
<div class="row">
<div class="col-md-10">
<div class="group-component">
<h5>Show Form</h5>
<div class="col-md-3">
<tl-button [text]="'User Register'" [iconAddonBefore]="'ion-ios-list-outline'"
(click)="form1()"></tl-button>
</div>
<div class="col-md-3">
<tl-button [text]="'Pacient Register'" [iconAddonBefore]="'ion-ios-list-outline'"
(click)="form2()"></tl-button>
</div>
<div class="col-md-3">
<tl-button [text]="'Count Register'" [iconAddonBefore]="'ion-ios-list-outline'"
(click)="form3()"></tl-button>
</div>
</div>
</div>
</div>
<div class="row">
<br>
<div class="col-md-12">
<pre>
<code>
{{result | json}}
</code>
</pre>
</div>
<div class="col-md-12">
<div class="container-modal">
<tl-container-modal></tl-container-modal>
</div>
</div>
</div>
<div class="setup">
<h3 class="title">Note</h3>
<div class="pattern" style="font-size: 15px">
<blockquote>The Component that you want to customize inside an Form has to be created with the form tag:
<code><tl-form></tl-form></code>
</blockquote>
</div>
<h3 class="title">Properties</h3>
<div class="table-box">
<table class="table table-truly">
<thead class="table-truly-head">
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
<th>Options</th>
</tr>
</thead>
<tbody class="table-truly-body" *ngFor="let item of formprop; let i = index">
<tr>
<td><span>{{ item.name }}</span></td>
<td><span class="badge">{{ item.type }}</span></td>
<td><code>{{ item.default }}</code></td>
<td>{{ item.description }}</td>
<td><code> {{ item.options }} </code></td>
</tr>
</tbody>
</table>
</div>
<hr>
<h3 class="title">Events</h3>
<div class="table-box">
<table class="table table-truly">
<thead class="table-truly-head">
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody class="table-truly-body" *ngFor="let item of formevts; let i = index">
<tr>
<td><span>{{ item.name }}</span></td>
<td>{{ item.description }}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="examples">
<h3 class="title">Examples</h3>
<div class="group-component">
<h5 class="title">Modal Options</h5>
<textarea highlight-js [options]="{'tabReplace': ''}" [lang]="'typescript'">
this.formOptions = {
title: 'New Modal',
icon: 'ion-monitor',
draggable: true,
width: '500px',
height: 'auto',
maximizable: true,
minimizable: true
};
</textarea>
</div>
<div class="group-component">
<h5 class="title">Form With Options</h5>
<textarea highlight-js [options]="{'tabReplace': ''}" [lang]="'typescript'">
this.formService.createForm(NewPerson, this.formOptions, (modalResult) => {
this.dataFormService.saveDataForm(modalResult.formResult);
this.result = this.dataFormService.getDataForm();
});
});
</textarea>
</div>
</div>
<footer class="minimize-box">
<span *ngFor="let item of modals; let i = index" (click)="show(item, i)">{{item.instance.label}}</span>
</footer>
</div>
</div>