angular-matecu 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -26
- package/angular-matecu-4.0.1.tgz +0 -0
- package/package.json +1 -1
- package/angular-matecu-4.0.0.tgz +0 -0
package/README.md
CHANGED
|
@@ -159,50 +159,96 @@ El contenido de la página tiene una función que se puede llamar para realizar
|
|
|
159
159
|
|
|
160
160
|
Importar módulo o componentes
|
|
161
161
|
|
|
162
|
+
```
|
|
163
|
+
// ...
|
|
162
164
|
import { MatecuTopbarLayoutModule } from 'angular-matecu';
|
|
163
|
-
|
|
164
|
-
import {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
165
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
166
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
167
|
+
// Se pueden importar los componentes de forma individual
|
|
168
|
+
// ...
|
|
169
|
+
@NgModule({
|
|
170
|
+
|
|
171
|
+
declarations: [AppComponent],
|
|
172
|
+
imports: [
|
|
173
|
+
// ...
|
|
174
|
+
MatecuTopbarLayoutModule,
|
|
175
|
+
MatIconModule,
|
|
176
|
+
MatButtonModule
|
|
177
|
+
// ...
|
|
178
|
+
],
|
|
179
|
+
providers: [],
|
|
180
|
+
bootstrap: [AppComponent],
|
|
181
|
+
})
|
|
182
|
+
export class AppModule {}
|
|
183
|
+
```
|
|
172
184
|
|
|
173
185
|
Agregar a la plantilla de algún componente:
|
|
174
186
|
|
|
175
187
|
```
|
|
176
188
|
<matecu-topbar-layout #topbar>
|
|
177
189
|
<matecu-topbar-header-row first-row>
|
|
178
|
-
|
|
190
|
+
<matecu-topbar-header-column left-column>
|
|
179
191
|
<matecu-topbar-action>
|
|
180
|
-
|
|
192
|
+
<button mat-icon-button><mat-icon>menu</mat-icon></button>
|
|
181
193
|
</matecu-topbar-action>
|
|
182
194
|
<matecu-topbar-fab>
|
|
183
|
-
|
|
195
|
+
<button mat-fab><mat-icon>add</mat-icon></button>
|
|
184
196
|
</matecu-topbar-fab>
|
|
185
197
|
<matecu-topbar-title>Topbar Layout</matecu-topbar-title>
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
198
|
+
</matecu-topbar-header-column>
|
|
199
|
+
<matecu-topbar-header-column right-column>
|
|
200
|
+
<matecu-topbar-search
|
|
201
|
+
placeholder="Buscar..."
|
|
202
|
+
(valueChange)="searchFunction($event)"
|
|
203
|
+
></matecu-topbar-search>
|
|
190
204
|
<matecu-topbar-action>
|
|
191
|
-
|
|
205
|
+
<button mat-icon-button><mat-icon>more_vert</mat-icon></button>
|
|
192
206
|
</matecu-topbar-action>
|
|
193
|
-
|
|
207
|
+
</matecu-topbar-header-column>
|
|
194
208
|
</matecu-topbar-header-row>
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
Regresar al inicio
|
|
200
|
-
</button>
|
|
201
|
-
</matecu-topbar-body>
|
|
202
|
-
|
|
209
|
+
<matecu-topbar-body>
|
|
210
|
+
Contenido de la página .....
|
|
211
|
+
<button (click)="topbar.scrollTop()">Regresar al inicio</button>
|
|
212
|
+
</matecu-topbar-body>
|
|
203
213
|
</matecu-topbar-layout>
|
|
214
|
+
|
|
204
215
|
```
|
|
205
216
|
|
|
217
|
+
Agregar al componente el método para capturar el texto de búsqueda
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
import { Component } from '@angular/core';
|
|
221
|
+
|
|
222
|
+
@Component({
|
|
223
|
+
selector: 'app-root',
|
|
224
|
+
templateUrl: './app.component.html',
|
|
225
|
+
styleUrls: ['./app.component.scss'],
|
|
226
|
+
})
|
|
227
|
+
export class AppComponent {
|
|
228
|
+
searchFunction(searchText: string) {
|
|
229
|
+
console.log(searchText);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Ajustar los colores y los estilos en el archivo de css del componente o el archivo de css global
|
|
237
|
+
|
|
238
|
+
````
|
|
239
|
+
// global
|
|
240
|
+
:root {
|
|
241
|
+
// ...
|
|
242
|
+
--mtb-primary-color: red;
|
|
243
|
+
// ...
|
|
244
|
+
}
|
|
245
|
+
// en el componente
|
|
246
|
+
:host {
|
|
247
|
+
// ...
|
|
248
|
+
--mtb-primary-color: red;
|
|
249
|
+
// ...
|
|
250
|
+
}
|
|
251
|
+
```
|
|
206
252
|
## Componentes
|
|
207
253
|
|
|
208
254
|
### MatecuTopbarLayout:
|
|
@@ -305,3 +351,4 @@ Crea un contenedor para agregar el contenido de la página
|
|
|
305
351
|
--mtb-body-padding: Padding para el contenido
|
|
306
352
|
--mtb-body-background: Fondo del contenido;
|
|
307
353
|
--mtb-body-padding-button: Padding inferior (Es utilizado para asignar un espacio al Botón principal (FAB) cuando tiene asignados los estilos para dispositivos móviles)
|
|
354
|
+
````
|
|
Binary file
|
package/package.json
CHANGED
package/angular-matecu-4.0.0.tgz
DELETED
|
Binary file
|