DaffThumbnailDirective
A directive marking thumbnails for the DaffMediaRendererComponent
. Needs to be wrapped in a daff-media-gallery
component
and needs to be placed on a component that is provided as a daffThumbnailCompatToken
.
import { DaffThumbnailDirective } from '@daffodil/design/media-gallery'
@Directive()
class DaffThumbnailDirective implements OnInit, OnDestroy, DaffThumbnailRegistration {
@Inject() component: Type<unknown>
@Inject() gallery: DaffMediaGalleryRegistration
get selected()
select()
deselect()
@HostBinding() class: true
@HostListener() onClick($event: MouseEvent)
ngOnInit(): void
ngOnDestroy(): void
}
Selector:
'[daffThumbnail]'
Properties
Name | Type | Description |
---|---|---|
component | Type<unknown> | |
gallery | DaffMediaGalleryRegistration | |
selected | ||
select | ||
deselect | ||
class | true | Adds a class for styling a thumbnail |
onClick | Adds a click event to trigger selection of the media element. |
|
ngOnInit | void | |
ngOnDestroy | void |