97399 Documentation

This commit is contained in:
Koen Pauwels
2022-12-19 17:05:26 +01:00
parent 1ae18ec9f7
commit c158fd18c9
2 changed files with 20 additions and 3 deletions

View File

@@ -1,5 +1,3 @@
<ng-template #help> <ng-template #help>
<div class="preserve-line-breaks ds-context-help-content"> <div class="preserve-line-breaks ds-context-help-content">
<ng-container *ngFor="let elem of (parsedContent$ | async)"> <ng-container *ngFor="let elem of (parsedContent$ | async)">
@@ -10,7 +8,6 @@
{{ elem }} {{ elem }}
</ng-container> </ng-container>
</ng-container> </ng-container>
<!-- {{ content | translate }} -->
</div> </div>
</ng-template> </ng-template>
<i [ngClass]="{'ds-context-help-icon fas fa-question-circle shadow-sm': true, <i [ngClass]="{'ds-context-help-icon fas fa-question-circle shadow-sm': true,

View File

@@ -5,15 +5,35 @@ import { Observable, of as observableOf } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { PlacementDir } from './placement-dir.model'; import { PlacementDir } from './placement-dir.model';
/*
* This component renders an info icon next to the wrapped element which
* produces a tooltip when clicked.
*/
@Component({ @Component({
selector: 'ds-context-help-wrapper', selector: 'ds-context-help-wrapper',
templateUrl: './context-help-wrapper.component.html', templateUrl: './context-help-wrapper.component.html',
styleUrls: ['./context-help-wrapper.component.scss'], styleUrls: ['./context-help-wrapper.component.scss'],
}) })
export class ContextHelpWrapperComponent { export class ContextHelpWrapperComponent {
/*
* Template reference for the wrapped element.
*/
@Input() templateRef: TemplateRef<any>; @Input() templateRef: TemplateRef<any>;
/*
* Indicate where the tooltip should show up, relative to the info icon.
*/
@Input() tooltipPlacement?: PlacementArray; @Input() tooltipPlacement?: PlacementArray;
/*
* Indicate whether the info icon should appear to the left or to
* the right of the wrapped element.
*/
@Input() iconPlacement?: PlacementDir; @Input() iconPlacement?: PlacementDir;
/*
* If true, don't process text to render links.
*/
@Input() dontParseLinks?: boolean; @Input() dontParseLinks?: boolean;
// TODO: dependent on evaluation order of input setters? // TODO: dependent on evaluation order of input setters?