Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
Draft
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
8 changes: 5 additions & 3 deletions src/app/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import { StacheNavLink } from './public/src/modules/nav';
templateUrl: './home.component.html'
})
export class HomeComponent {
public actionButtonRoutes = [
public actionButtonRoutes: StacheNavLink[] = [
{
name: 'Action Button 1',
path: '/demos',
icon: 'book',
summary: 'Short summary here.'
summary: 'Short summary here.',
isInternal: true
},
{
name: 'Action Button 2',
Expand All @@ -23,7 +24,8 @@ export class HomeComponent {
name: 'Action Button 3',
path: 'http://google.com',
icon: 'certificate',
summary: 'Short summary here.'
summary: 'Short summary here.',
isInternal: true
},
{
name: 'Action Button 4',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,65 @@
<div class="stache-action-buttons" *ngIf="routes.length">
<div *ngIf="showSearch" class="stache-action-buttons-search-container">
<sky-search expandMode="fit"
<sky-search
expandMode="fit"
[searchText]="searchText"
(searchApply)="searchApplied($event)"
(keyup)="onKeyUp($event)">
(keyup)="onKeyUp($event)"
>
</sky-search>
</div>
<stache-row>
<nav class="stache-action-buttons-nav-container">
<stache-column screenSmall="6" screenMedium="4" screenLarge="3" *ngFor="let route of filteredRoutes">
<a stacheRouterLink="{{route.path}}" fragment="{{route.fragment}}" class="stache-action-button-override sky-action-button sky-btn-default sky-rounded-corners">
<div>
<sky-action-button-icon *ngIf="route.icon" iconType="{{route.icon}}">
</sky-action-button-icon>
<sky-action-button-header>
{{route.name}}
</sky-action-button-header>
</div>
<sky-action-button-details>
{{route.summary}}
</sky-action-button-details>
</a>
</stache-column>
<div *ngFor="let route of filteredRoutes">
<div *ngIf="route.isInternal">
<stache-internal>
<stache-column>
<a
stacheRouterLink="{{ route.path }}"
fragment="{{ route.fragment }}"
class="stache-action-button-override sky-action-button sky-btn-default sky-rounded-corners"
>
<div>
<sky-action-button-icon
*ngIf="route.icon"
iconType="{{ route.icon }}"
>
</sky-action-button-icon>
<sky-action-button-header>
{{ route.name }}
</sky-action-button-header>
</div>
<sky-action-button-details>
{{ route.summary }}
</sky-action-button-details>
</a>
</stache-column>
</stache-internal>
</div>
<div *ngIf="!route.isInternal">
<stache-column>
<a
stacheRouterLink="{{ route.path }}"
fragment="{{ route.fragment }}"
class="stache-action-button-override sky-action-button sky-btn-default sky-rounded-corners"
>
<div>
<sky-action-button-icon
*ngIf="route.icon"
iconType="{{ route.icon }}"
>
</sky-action-button-icon>
<sky-action-button-header>
{{ route.name }}
</sky-action-button-header>
</div>
<sky-action-button-details>
{{ route.summary }}
</sky-action-button-details>
</a>
</stache-column>
</div>
</div>
</nav>
</stache-row>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { SkySearchModule } from '@blackbaud/skyux/dist/modules/search';
import { StacheGridModule } from '../grid';
import { StacheActionButtonsComponent } from './action-buttons.component';
import { StacheLinkModule } from '../link';
import { StacheInternalModule } from '../internal';

@NgModule({
declarations: [
Expand All @@ -17,7 +18,8 @@ import { StacheLinkModule } from '../link';
SkyActionButtonModule,
SkySearchModule,
StacheLinkModule,
StacheGridModule
StacheGridModule,
StacheInternalModule
],
exports: [
StacheActionButtonsComponent
Expand Down
1 change: 1 addition & 0 deletions src/app/public/src/modules/nav/nav-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export interface StacheNavLink {
isActive?: boolean;
isCurrent?: boolean;
showInNav?: boolean;
isInternal?: boolean;
}