File

src/app/manage-learn/shared/components/metadata-actions/metadata-actions.component.ts

Implements

OnInit

Metadata

Index

Methods
Inputs
Outputs

Constructor

constructor()

Inputs

actionItems
Type : any

Outputs

actionEvent
Type : EventEmitter

Methods

action
action(event)
Parameters :
Name Optional
event No
Returns : void
ngOnInit
ngOnInit()
Returns : void
import { Component, OnInit,Input,Output, EventEmitter } from '@angular/core';

@Component({
  selector: 'app-metadata-actions',
  templateUrl: './metadata-actions.component.html',
  styleUrls: ['./metadata-actions.component.scss'],
})
export class MetadataActionsComponent implements OnInit {
@Input() actionItems:any;
@Output() actionEvent = new EventEmitter();
  constructor() { }

  ngOnInit() {}

  action(event){
    this.actionEvent.emit(event);
  }
}
<div class="sb-dt-card-actions">
  <div class="wrapper sb-btn-tile-group btn-space-btwn">
    <button *ngFor="let actionItem of actionItems" (click)="action(actionItem.action)" slot="icon-only"
      class="card-button">
      <ion-icon name="{{actionItem?.icon}}" class="card-icons icon-style {{actionItem.color}}">
      </ion-icon>
      <p class="card-text">{{actionItem?.title| translate}}
      </p>
    </button>
  </div>
</div>

./metadata-actions.component.scss

@import "src/assets/styles/_variables.scss";

.card-icons {
    font-size: 1.875rem;
  }

  .primary {
    color: $blue;
  }

  .success {
    color: $green;
  }
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""