]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/buttons/action-dropdown.component.ts
Improve follow component routing
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / buttons / action-dropdown.component.ts
index 407d24b80f31f7c321a153bb76bda6bd5fc8495e..17f9cc6188d54ac839a19084c179a0ee8ee11f76 100644 (file)
@@ -1,11 +1,10 @@
 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({
@@ -17,4 +16,5 @@ export type DropdownAction<T> = {
 export class ActionDropdownComponent<T> {
   @Input() actions: DropdownAction<T>[] = []
   @Input() entry: T
+  @Input() placement = 'left'
 }