-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from ShipBit/feature/action-custom-content
Rework custom action content
- Loading branch information
Showing
5 changed files
with
127 additions
and
84 deletions.
There are no files selected for viewing
21 changes: 11 additions & 10 deletions
21
projects/ngx-tour-guide/src/lib/action/action.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<button | ||
[hidden]="action?.hidden" | ||
[attr.ngx-tour-guide-button]="actionKey" | ||
(click)="tourGuideService.executeAction(actionKey)" | ||
> | ||
<ng-content> </ng-content> | ||
<label *ngIf="action?.label as label"> | ||
{{ label }} | ||
</label> | ||
</button> | ||
<div [hidden]="action?.hidden"> | ||
<div #customActionContent><ng-content></ng-content></div> | ||
|
||
<button | ||
*ngIf="!customActionContent.children.length && action?.label" | ||
[class]="action?.buttonClasses" | ||
(click)="tourGuideService.executeAction(actionKey)" | ||
> | ||
<label>{{ action?.label }}</label> | ||
</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,76 @@ | ||
/* You can add global styles to this file, and also import other style files */ | ||
@import "~@angular/cdk/overlay-prebuilt.css"; | ||
|
||
.ngx-tour-guide { | ||
.tour-guide-container[ngxTourGuidecontainer] { | ||
padding: 1rem; | ||
border: none; | ||
border-radius: 0.5rem; | ||
background: #f1f3f7; | ||
color: #7b8ab8; | ||
box-shadow: 0px 0px 25px rgb(255 255 255 / 40%); | ||
} | ||
.ngx-tourguide--button { | ||
color: #7b8ab8; | ||
background-color: #d9e3f1; | ||
border: none; | ||
border-radius: 0.5rem 0; | ||
display: flex; | ||
align-items: center; | ||
padding: 0.25rem; | ||
|
||
.tour-guide--overlay[ngxTourGuideOverlay] { | ||
background-color: hsla(189deg, 62%, 4%, 0.75); | ||
backdrop-filter: none; | ||
} | ||
&:focus { | ||
outline: none; | ||
border: 1px solid #296abd; | ||
} | ||
|
||
.tour-guide-stop[ngxTourGuideStop] { | ||
.stop-title { | ||
color: #8E7BBE; | ||
text-transform: uppercase; | ||
text-shadow: 0px 0px 4px #7bacbe; | ||
padding-bottom: .25rem; | ||
position: relative; | ||
font-size: 1.5rem; | ||
font-weight: 400; | ||
letter-spacing: 2px; | ||
margin-bottom: 1rem; | ||
&:hover, | ||
&:active { | ||
color: #fff; | ||
background-color: #2c71ca; | ||
} | ||
|
||
&::after { | ||
content: ""; | ||
height: 1px; | ||
position: absolute; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
background: #8E7BBE; | ||
} | ||
} | ||
&:active { | ||
border-color: transparent; | ||
box-shadow: inset 2px 3px 6px rgb(0 0 0 / 20%), | ||
inset -3px -2px 6px rgb(255 255 255 / 20%); | ||
} | ||
} | ||
|
||
.stop-counter { | ||
color: #95a1ca; | ||
[index] { | ||
color: #8E7BBE; | ||
} | ||
} | ||
} | ||
.ngx-tour-guide { | ||
.tour-guide-container[ngxTourGuidecontainer] { | ||
padding: 1rem; | ||
border: none; | ||
border-radius: 0.5rem; | ||
background: #f1f3f7; | ||
color: #7b8ab8; | ||
box-shadow: 0px 0px 25px rgb(255 255 255 / 40%); | ||
} | ||
|
||
button { | ||
color: #7b8ab8; | ||
background-color: #d9e3f1; | ||
border: none; | ||
border-radius: .5rem 0; | ||
display: flex; | ||
align-items: center; | ||
.tour-guide--overlay[ngxTourGuideOverlay] { | ||
background-color: hsla(189deg, 62%, 4%, 0.75); | ||
backdrop-filter: none; | ||
} | ||
|
||
&:focus { | ||
outline: none; | ||
border: 1px solid #296abd; | ||
} | ||
.tour-guide-stop[ngxTourGuideStop] { | ||
.stop-title { | ||
color: #8e7bbe; | ||
text-transform: uppercase; | ||
text-shadow: 0px 0px 4px #7bacbe; | ||
padding-bottom: 0.25rem; | ||
position: relative; | ||
font-size: 1.5rem; | ||
font-weight: 400; | ||
letter-spacing: 2px; | ||
margin-bottom: 1rem; | ||
|
||
&:hover, | ||
&:active { | ||
color: #fff; | ||
background-color: #2c71ca; | ||
} | ||
&::after { | ||
content: ""; | ||
height: 1px; | ||
position: absolute; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
background: #8e7bbe; | ||
} | ||
} | ||
|
||
&:active { | ||
border-color: transparent; | ||
box-shadow: inset 2px 3px 6px rgb(0 0 0 / 20%), inset -3px -2px 6px rgb(255 255 255 / 20%); | ||
} | ||
.stop-counter { | ||
color: #95a1ca; | ||
[index] { | ||
color: #8e7bbe; | ||
} | ||
} | ||
} | ||
} |