Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to specify dialog header colour as input to feedback directive #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ easy to use the directive, just add it in a html tag, such as:
| `highlightTip` | highlight issues |
| `hideTip` | hide sensitive info |
| `editDoneLabel` | DONE |
| `headerColour` | rgb(96, 125, 139) |

### method

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="dialog" *ngIf="!showToolbar" data-html2canvas-ignore="true">
<div class="dialog-title">
<div class="dialog-title" [ngStyle]="{background: vars['headerColour']}">
<div class="title-font">
{{vars['title']}}
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/app/feedback/feedback.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class FeedbackDirective implements OnInit {
@Input() highlightTip = 'highlight issues';
@Input() hideTip = 'hide sensitive info';
@Input() editDoneLabel = 'DONE';
@Input() headerColour = 'rgb(96, 125, 139)';
@Output() public send = new EventEmitter<object>();

public constructor(private dialogRef: MatDialog, private feedbackService: FeedbackService, overlay: Overlay) {
Expand Down Expand Up @@ -58,7 +59,8 @@ export class FeedbackDirective implements OnInit {
drawRectTip: this.drawRectTip,
highlightTip: this.highlightTip,
hideTip: this.hideTip,
editDoneLabel: this.editDoneLabel
editDoneLabel: this.editDoneLabel,
headerColour: this.headerColour
};
}

Expand Down