Skip to content

feat(docs): added examples for input (#UIM-283) #356

Merged
merged 1 commit into from
Nov 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/** No CSS for this example */
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<mc-form-field class="mc-group-item">
<input mcInput [(ngModel)]="value" type="number" placeholder="Allowed number from -7 to 7"
[min]="-7" max="7" step="0.5" big-step="1.5">
<mc-stepper></mc-stepper>
</mc-form-field>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Component } from '@angular/core';


/**
* @title Basic Input
*/
@Component({
selector: 'input-number-overview-example',
templateUrl: 'input-number-overview-example.html',
styleUrls: ['input-number-overview-example.css']
})
export class InputNumberOverviewExample {
value = '';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/** No CSS for this example */
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<mc-form-field>
<i mcPrefix mc-icon="mc-search_16" color="second"></i>

<input mcInput [(ngModel)]="value" placeholder="Placeholder">

<mc-cleaner></mc-cleaner>
</mc-form-field>

<br><br><br>

<mc-form-field mcFormFieldWithoutBorders>
<i mcPrefix mc-icon="mc-search_16" color="second"></i>

<input mcInput [(ngModel)]="value" placeholder="Placeholder">

<mc-cleaner></mc-cleaner>
</mc-form-field>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Component } from '@angular/core';


/**
* @title Basic Input
*/
@Component({
selector: 'input-overview-example',
templateUrl: 'input-overview-example.html',
styleUrls: ['input-overview-example.css']
})
export class InputOverviewExample {
value = '';
}
26 changes: 26 additions & 0 deletions packages/mosaic-examples/mosaic/input/module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { McFormFieldModule } from '@ptsecurity/mosaic/form-field';
import { McIconModule } from '@ptsecurity/mosaic/icon';
import { McInputModule } from '@ptsecurity/mosaic/input';

import { InputNumberOverviewExample } from './input-number-overview/input-number-overview-example';
import { InputOverviewExample } from './input-overview/input-overview-example';


const EXAMPLES = [
InputOverviewExample,
InputNumberOverviewExample
];

@NgModule({
imports: [
FormsModule,
McFormFieldModule,
McIconModule,
McInputModule
],
declarations: EXAMPLES,
exports: EXAMPLES
})
export class InputExamplesModule {}
5 changes: 5 additions & 0 deletions packages/mosaic/input/input.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#### With default parameters
<!-- example(input-overview) -->

#### Numeric input
<!-- example(input-number-overview) -->