1
|
import {Component, Input} from '@angular/core';
|
2
|
import {ButtonsCustomization} from '../../openaireLibrary/connect/community/CustomizationOptions';
|
3
|
|
4
|
|
5
|
@Component({
|
6
|
selector: 'customize-buttons',
|
7
|
template: `
|
8
|
|
9
|
<div class="">
|
10
|
<border [style]="buttons.borderStyle" [width]=
|
11
|
"buttons.borderWidth" [radius]=
|
12
|
"buttons.borderRadius" (borderChange)=
|
13
|
" buttons.borderStyle = $event.style;
|
14
|
buttons.borderRadius = $event.radius;
|
15
|
buttons.borderWidth = $event.width; "></border>
|
16
|
<div class="uk-grid uk-child-width-1-2 uk-margin-top" >
|
17
|
<div class="">
|
18
|
<div class=" uk-margin-small-bottom uk-text-bold uk-margin-small-left">Colors</div>
|
19
|
<color [color]="buttons.color" (colorChange)=
|
20
|
" buttons.color = $event; "
|
21
|
label="Fonts" [light]="!light"
|
22
|
></color>
|
23
|
<color [color]="buttons.backgroundColor" (colorChange)=
|
24
|
" buttons.backgroundColor = $event; " [light]="light"
|
25
|
label="Background" ></color>
|
26
|
<color [color]="buttons.borderColor" (colorChange)=
|
27
|
" buttons.borderColor = $event; " [light]="light"
|
28
|
label="Border"
|
29
|
|
30
|
></color>
|
31
|
</div>
|
32
|
<div>
|
33
|
<div class=" uk-margin-small-bottom uk-text-bold uk-margin-small-left">Colors on hover</div>
|
34
|
<div class="">
|
35
|
<color [color]="buttons.onHover.color" (colorChange)=
|
36
|
" buttons.onHover.color = $event;" label="Fonts" [light]="!light"
|
37
|
></color>
|
38
|
<color [color]="buttons.onHover.backgroundColor"
|
39
|
(colorChange)=
|
40
|
" buttons.onHover.backgroundColor = $event;" [light]="light"
|
41
|
label="Background" ></color>
|
42
|
<color [color]="buttons.onHover.borderColor" (colorChange)=
|
43
|
" buttons.onHover.borderColor = $event;" [light]="light"
|
44
|
label="Border" ></color>
|
45
|
</div>
|
46
|
</div>
|
47
|
</div>
|
48
|
</div>
|
49
|
|
50
|
|
51
|
`,
|
52
|
styles:[` `]
|
53
|
|
54
|
})
|
55
|
|
56
|
export class CustomizeButtonsComponent {
|
57
|
@Input() buttons:ButtonsCustomization;
|
58
|
@Input() light:boolean;
|
59
|
constructor() {
|
60
|
}
|
61
|
|
62
|
}
|