1 import { Component, Input } from '@angular/core'
3 export type DropdownAction<T> = {
5 handler?: (T: any) => any
6 linkBuilder?: (T: any) => (string | number)[]
7 isDisplayed?: (T: any) => boolean
11 selector: 'my-action-dropdown',
12 styleUrls: [ './action-dropdown.component.scss' ],
13 templateUrl: './action-dropdown.component.html'
16 export class ActionDropdownComponent<T> {
17 @Input() actions: DropdownAction<T>[] = []
19 @Input() placement = 'bottom-left'
20 @Input() buttonSize: 'normal' | 'small' = 'normal'
21 @Input() label: string
22 @Input() theme: 'orange' | 'grey' = 'grey'