import { Component, Input } from '@angular/core'
export type DropdownAction<T> = {
- type: 'custom' | 'delete' | 'edit'
label?: string
handler?: (T) => any
linkBuilder?: (T) => (string | number)[]
- iconClass?: string
+ isDisplayed?: (T) => boolean
}
@Component({
export class ActionDropdownComponent<T> {
@Input() actions: DropdownAction<T>[] = []
@Input() entry: T
+ @Input() placement = 'left'
}