import { Component, Input } from '@angular/core' export type DropdownAction = { label?: string handler?: (a: T) => any linkBuilder?: (a: T) => (string | number)[] isDisplayed?: (a: T) => boolean } @Component({ selector: 'my-action-dropdown', styleUrls: [ './action-dropdown.component.scss' ], templateUrl: './action-dropdown.component.html' }) export class ActionDropdownComponent { @Input() actions: DropdownAction[] = [] @Input() entry: T @Input() placement = 'bottom-left' @Input() buttonSize: 'normal' | 'small' = 'normal' @Input() label: string @Input() theme: 'orange' | 'grey' = 'grey' }