79597: Add input to toggle thumbnail max-width

This commit is contained in:
Yura Bondarenko
2021-05-27 08:59:32 +02:00
parent ca7d45ff0c
commit 41c07e74ca
3 changed files with 12 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ import { hasValue } from '../shared/empty.util';
/**
* This component renders a given Bitstream as a thumbnail.
* One input parameter of type Bitstream is expected.
* If no Bitstream is provided, a holderjs image will be rendered instead.
* If no Bitstream is provided, a HTML placeholder will be rendered instead.
*/
@Component({
selector: 'ds-thumbnail',
@@ -39,6 +39,11 @@ export class ThumbnailComponent implements OnInit {
*/
@Input() placeholder? = 'thumbnail.default.placeholder';
/**
* Limit thumbnail width to --ds-thumbnail-max-width
*/
@Input() limitWidth? = true;
/**
* Initialize the thumbnail.
* Use a default image if no actual image is available.