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

[Chore] Panel Disable Option #824

Merged
merged 9 commits into from
Aug 20, 2021
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<ng-template #noLink>
<button
class="go-panel"
[disabled]="disablePanel"
[ngClass]="panelClasses()"
(click)="handleAction()">
<span class="go-panel__title">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@import '../../../../../styles/mixins';

$base-medium: #767676 !default;
$theme-light-transparentized: rgba($theme-light-color, .5);

.go-panel {
@include transition;
Expand Down Expand Up @@ -72,6 +73,11 @@ $base-medium: #767676 !default;
&--header {
color: $base-medium;
}

&--disabled {
color: $theme-light-transparentized;
pointer-events: none;
}
}

.go-action-sheet {
Expand Down Expand Up @@ -116,4 +122,8 @@ button {
&:focus {
outline: none;
}

&:disabled {
grahamhency marked this conversation as resolved.
Show resolved Hide resolved
color: $theme-light-transparentized;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export class GoPanelComponent {
@Input() panelContent: string;
@Input() target: string;
@Input() closeOnClick: boolean = true;
@Input() disablePanel: boolean = false;

@Output() action: EventEmitter<void> = new EventEmitter<void>();

Expand All @@ -23,7 +24,8 @@ export class GoPanelComponent {
panelClasses(): object {
return {
'go-panel--danger': this.danger,
'go-panel--header': this.showHeader
'go-panel--header': this.showHeader,
'go-panel--disabled': this.disablePanel
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ <h4 class="go-heading-4">closeOnClick</h4>
</p>
</div>

<div class="go-column go-column--100">
<h4 class="go-heading-4">disablePanel</h4>
<p class="go-body-copy">
This determines whether the panel will be disabled or not.
Defaults to <code class="code-block--inline">false</code>.
</p>
</div>

</div>
</go-card>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export class ActionSheetPanelDocsComponent {
@Input() panelContent: string;
@Input() target: string = '_blank';
@Input() closeOnClick: boolean = true;
@Input() disablePanel: boolean = false;

@Output() action: EventEmitter<void> = new EventEmitter<void>();
`;
Expand Down