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 4 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
@@ -1,6 +1,7 @@
<!-- External Link -->
<a
class="go-panel"
[class.go-panel__disabled]="disablePanel"
jiaweicai92 marked this conversation as resolved.
Show resolved Hide resolved
[target]="target ? target : '_blank'"
[rel]="target ? target : 'noreferrer'"
[ngClass]="panelClasses()"
Expand All @@ -17,6 +18,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 @@ -72,6 +72,11 @@ $base-medium: #767676 !default;
&--header {
color: $base-medium;
}

&__disabled {
opacity: 0.5;
grahamhency marked this conversation as resolved.
Show resolved Hide resolved
pointer-events: none;
}
}

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

&:disabled {
grahamhency marked this conversation as resolved.
Show resolved Hide resolved
opacity: 0.5;
grahamhency marked this conversation as resolved.
Show resolved Hide resolved
}
}
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 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