1
- import { CommonModule } from ' @angular/common' ;
2
- import { Component , ElementRef , Input , ViewChild } from ' @angular/core' ;
1
+ import { CommonModule } from " @angular/common" ;
2
+ import { Component , ElementRef , Input , ViewChild } from " @angular/core" ;
3
3
4
4
@Component ( {
5
- selector : ' om-gridpattern' ,
5
+ selector : " om-gridpattern" ,
6
6
standalone : true ,
7
7
imports : [ CommonModule ] ,
8
8
templateUrl : "./ngx-gridpattern.component.html" ,
9
9
styleUrl : "./ngx-gridpattern.component.scss" ,
10
10
} )
11
11
export class NgxGridpatternComponent {
12
- @ViewChild ( ' OmGridPatternBackground' )
12
+ @ViewChild ( " OmGridPatternBackground" )
13
13
elementRef ! : ElementRef < HTMLElement > ;
14
14
15
15
@Input ( "styleClass" )
16
16
styleClass ?: string ;
17
17
18
18
@Input ( "smallGrid" )
19
+ set smallGridValue ( smallGrid : boolean ) {
20
+ this . smallGrid = smallGrid ;
21
+ this . setGridStyle ( ) ;
22
+ }
23
+
19
24
smallGrid = false ;
20
25
21
26
@Input ( "gridColor" )
@@ -24,20 +29,20 @@ export class NgxGridpatternComponent {
24
29
this . setGridStyle ( ) ;
25
30
}
26
31
27
- gridColor : string = ' rgba(255, 255, 255, 0.2)' ;
32
+ gridColor : string = " rgba(255, 255, 255, 0.2)" ;
28
33
29
34
@Input ( "gradientColor" )
30
35
set gradientColorValue ( color : string ) {
31
36
this . gradientColor = color ;
32
37
this . setGridStyle ( ) ;
33
38
}
34
39
35
- gradientColor : string = ' rgb(0, 0, 0)' ;
40
+ gradientColor : string = " rgb(0, 0, 0)" ;
36
41
37
42
gridStyle : any = { } ;
38
43
39
44
setGridStyle ( ) : void {
40
- let dataUri = '' ;
45
+ let dataUri = "" ;
41
46
42
47
if ( this . smallGrid ) {
43
48
dataUri = `data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='16' height='16' fill='none' stroke='${ this . gridColor } ' %3e%3cpath d='M0 .5H31.5V32'/%3e%3c/svg%3e` ;
0 commit comments