|
16 | 16 | } |
17 | 17 | ]; |
18 | 18 |
|
| 19 | + const OFFSETS_CONFIGS: IPatternConfig[] = [ |
| 20 | + { |
| 21 | + name: 'bg-pattern-offset-x', |
| 22 | + options: [ |
| 23 | + { name: '-2', description: 'Offset x' }, |
| 24 | + { name: '-[321px]', description: 'Custom offset x' } |
| 25 | + ] |
| 26 | + }, |
| 27 | + { |
| 28 | + name: 'bg-pattern-offset-y', |
| 29 | + options: [ |
| 30 | + { name: '-2', description: 'Offset x' }, |
| 31 | + { name: '-[321px]', description: 'Custom offset x' } |
| 32 | + ] |
| 33 | + } |
| 34 | + ]; |
| 35 | +
|
19 | 36 | const DOT_CONFIGS: IPatternConfig[] = [ |
20 | 37 | { |
21 | 38 | name: 'bg-pattern-dot', |
|
64 | 81 | { |
65 | 82 | id: 'x-lines', |
66 | 83 | name: 'Horizontal lines', |
67 | | - configClasses: [...LINE_CONFIGS, ...SPACING_CONFIGS], |
| 84 | + configClasses: [...LINE_CONFIGS, ...SPACING_CONFIGS, ...OFFSETS_CONFIGS], |
68 | 85 | class: 'bg-blue-500 bg-pattern-x-lines bg-pattern-line-0.5 bg-pattern-spacing-20' |
69 | 86 | }, |
70 | 87 | { |
71 | 88 | id: 'y-lines', |
72 | 89 | name: 'Vertical lines', |
73 | | - configClasses: [...LINE_CONFIGS, ...SPACING_CONFIGS], |
| 90 | + configClasses: [...LINE_CONFIGS, ...SPACING_CONFIGS, ...OFFSETS_CONFIGS], |
74 | 91 | class: 'bg-blue-500 bg-pattern-y-lines bg-pattern-line-0.5 bg-pattern-spacing-32' |
75 | 92 | }, |
76 | 93 | { |
77 | 94 | id: 'grid', |
78 | 95 | name: 'Grid', |
79 | | - configClasses: [...LINE_CONFIGS, ...SPACING_CONFIGS], |
| 96 | + configClasses: [...LINE_CONFIGS, ...SPACING_CONFIGS, ...OFFSETS_CONFIGS], |
80 | 97 | class: 'bg-blue-500 bg-pattern-grid bg-pattern-line-0.5 bg-pattern-spacing-32' |
81 | 98 | }, |
82 | 99 | { |
83 | 100 | id: 'checkers', |
84 | 101 | name: 'Checkers', |
85 | | - configClasses: SQUARE_CONFIGS, |
| 102 | + configClasses: [...SQUARE_CONFIGS, ...OFFSETS_CONFIGS], |
86 | 103 | class: 'bg-blue-500 bg-pattern-checkers bg-pattern-square-white bg-pattern-square-32' |
87 | 104 | }, |
88 | 105 | { |
89 | 106 | id: 'hatching', |
90 | 107 | name: 'Hatching', |
91 | | - configClasses: [...LINE_CONFIGS, ...SPACING_CONFIGS, ...HATCHING_DIRECTION_CONFIGS], |
| 108 | + configClasses: [...LINE_CONFIGS, ...SPACING_CONFIGS, ...HATCHING_DIRECTION_CONFIGS, ...OFFSETS_CONFIGS], |
92 | 109 | class: |
93 | 110 | 'bg-blue-500 bg-pattern-hatching bg-pattern-line-0.5 bg-pattern-spacing-16 bg-pattern-hatching-left-to-right' |
94 | 111 | }, |
95 | 112 | { |
96 | 113 | id: 'cross-hatching', |
97 | 114 | name: 'Cross-Hatching', |
98 | | - configClasses: [...LINE_CONFIGS, ...SPACING_CONFIGS, ...HATCHING_DIRECTION_CONFIGS], |
| 115 | + configClasses: [...LINE_CONFIGS, ...SPACING_CONFIGS, ...HATCHING_DIRECTION_CONFIGS, ...OFFSETS_CONFIGS], |
99 | 116 | class: 'bg-blue-500 bg-pattern-cross-hatching bg-pattern-line-0.5 bg-pattern-spacing-16' |
100 | 117 | }, |
101 | 118 | { |
102 | 119 | id: 'polka-dot', |
103 | 120 | name: 'Polka dot', |
104 | | - configClasses: [...DOT_CONFIGS, ...SPACING_CONFIGS], |
| 121 | + configClasses: [...DOT_CONFIGS, ...SPACING_CONFIGS, ...OFFSETS_CONFIGS], |
105 | 122 | class: |
106 | 123 | 'bg-blue-500 bg-pattern-polka-dot bg-pattern-dot-white bg-pattern-dot-8 bg-pattern-spacing-32' |
107 | 124 | }, |
108 | 125 | { |
109 | 126 | id: 'hexagonal-polka-dot', |
110 | 127 | name: 'Hexagonal polka dot', |
111 | | - configClasses: [...DOT_CONFIGS, ...SPACING_CONFIGS], |
| 128 | + configClasses: [...DOT_CONFIGS, ...SPACING_CONFIGS, ...OFFSETS_CONFIGS], |
112 | 129 | class: |
113 | 130 | 'bg-blue-500 bg-pattern-hex-polka-dot bg-pattern-dot-white bg-pattern-dot-8 bg-pattern-spacing-32' |
114 | 131 | } |
|
0 commit comments