-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d72b071
commit 359210b
Showing
47 changed files
with
729 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module.exports = { | ||
printWidth: 120, | ||
printWidth: 80, | ||
tabWidth: 2, | ||
useTabs: false, | ||
semi: true, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
projects/examples/src/app/pages/check-box/check-box.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
<p>check-box works!</p> | ||
<fui-dynamic-form [formConfig]="inder"></fui-dynamic-form> | ||
<h1>Disabled</h1> | ||
<fui-dynamic-form [formConfig]="disabled"></fui-dynamic-form> |
29 changes: 21 additions & 8 deletions
29
projects/examples/src/app/pages/check-box/check-box.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,28 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Component, OnInit } from "@angular/core"; | ||
import { FuiFormBuilder as f } from "@fui/forms"; | ||
|
||
@Component({ | ||
selector: 'app-check-box', | ||
templateUrl: './check-box.component.html', | ||
styleUrls: ['./check-box.component.scss'] | ||
selector: "app-check-box", | ||
templateUrl: "./check-box.component.html", | ||
styleUrls: ["./check-box.component.scss"] | ||
}) | ||
export class CheckBoxComponent implements OnInit { | ||
inder = f.form({ inder: f.checkbox().indeterminate() }).showDebug(); | ||
disabled = f | ||
.form({ | ||
one: f | ||
.checkbox() | ||
.label("Disabled with defaultValue: true") | ||
.defaultValue(true), | ||
two: f.checkbox().label("Disabled with no default value") | ||
}) | ||
.disable({ | ||
one: model => true, | ||
two: model => true | ||
}) | ||
.showDebug(); | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
constructor() {} | ||
|
||
ngOnInit(): void {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
<p>color works!</p> | ||
<fui-dynamic-form [formConfig]="plain"></fui-dynamic-form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,28 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Component, OnInit } from "@angular/core"; | ||
import { FuiFormBuilder as f } from "@fui/forms"; | ||
|
||
@Component({ | ||
selector: 'app-color', | ||
templateUrl: './color.component.html', | ||
styleUrls: ['./color.component.scss'] | ||
selector: "app-color", | ||
templateUrl: "./color.component.html", | ||
styleUrls: ["./color.component.scss"] | ||
}) | ||
export class ColorComponent implements OnInit { | ||
plain = f | ||
.form({ | ||
radius100: f.color().label("Border-color r:100").radius(100), | ||
above: f | ||
.color() | ||
.label("Label-above") | ||
.labelPos("above") | ||
.hint("This is a hint"), | ||
after: f.color().label("Label-right").labelPos("after"), | ||
below: f.color().label("Label-below").labelPos("below"), | ||
before: f.color().label("Label-left").labelPos("before"), | ||
noLabel: f.color().labelPos("before").hint("No label") | ||
}) | ||
.showDebug(); | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
constructor() {} | ||
|
||
ngOnInit(): void {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>grid works!</p> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-grid', | ||
templateUrl: './grid.component.html', | ||
styleUrls: ['./grid.component.scss'] | ||
}) | ||
export class GridComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
<p>radio works!</p> | ||
<fui-dynamic-form [formConfig]="form1"></fui-dynamic-form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,33 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Component, OnInit } from "@angular/core"; | ||
import { FuiFormBuilder as f } from "@fui/forms"; | ||
|
||
@Component({ | ||
selector: 'app-radio', | ||
templateUrl: './radio.component.html', | ||
styleUrls: ['./radio.component.scss'] | ||
selector: "app-radio", | ||
templateUrl: "./radio.component.html", | ||
styleUrls: ["./radio.component.scss"] | ||
}) | ||
export class RadioComponent implements OnInit { | ||
form1 = f | ||
.form({ | ||
horizontal: f | ||
.radio([ | ||
{ label: "ONE", value: "one" }, | ||
{ label: "TWO", value: "two" }, | ||
{ label: "THREE", value: "three" } | ||
]) | ||
.label("Dette er label"), | ||
vertical: f | ||
.radio([ | ||
{ label: "ONE", value: "one" }, | ||
{ label: "TWO", value: "two" }, | ||
{ label: "THREE", value: "three" } | ||
]) | ||
.label("Vertical radio") | ||
.direction("column") | ||
}) | ||
.showDebug(); | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
constructor() {} | ||
|
||
ngOnInit(): void {} | ||
} |
1 change: 1 addition & 0 deletions
1
projects/examples/src/app/pages/slide-toggle/slide-toggle.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
<p>slide-toggle works!</p> | ||
<fui-dynamic-form [formConfig]="form1"></fui-dynamic-form> |
22 changes: 14 additions & 8 deletions
22
projects/examples/src/app/pages/slide-toggle/slide-toggle.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Component, OnInit } from "@angular/core"; | ||
import { FuiFormBuilder as f } from "@fui/forms"; | ||
|
||
@Component({ | ||
selector: 'app-slide-toggle', | ||
templateUrl: './slide-toggle.component.html', | ||
styleUrls: ['./slide-toggle.component.scss'] | ||
selector: "app-slide-toggle", | ||
templateUrl: "./slide-toggle.component.html", | ||
styleUrls: ["./slide-toggle.component.scss"] | ||
}) | ||
export class SlideToggleComponent implements OnInit { | ||
form1 = f | ||
.form({ | ||
checked: f.slideToggle().label("Label for true by default"), | ||
mustBeTrue: f.slideToggle().label("Must be checked").mustBeTrue(), | ||
labelBefore: f.slideToggle().label("Label before").labelPos("before") | ||
}) | ||
.showDebug(); | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
constructor() {} | ||
|
||
ngOnInit(): void {} | ||
} |
Oops, something went wrong.