-
-
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.
- Loading branch information
1 parent
96ae30e
commit 36f4b5a
Showing
12 changed files
with
85 additions
and
22 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div class="flex justify-center items-center xs:flex-1 md:flex md:h-24 md:flex-none" [ngClass]="'logo'" | ||
[class.xs:hidden]="tab.hideOnMobile" [class.md:hidden]="tab.hideOnDesktop"> | ||
<a class="flex flex-col items-center hover:text-blue" [class.hover:text-color]="tab.logo" [routerLink]="tab.url" | ||
[routerLinkActive]="tab.routeActive ? 'active-tab' : ''"> | ||
<niz-inline-svg class="h-8 w-8" [svgSource]="tab.image"></niz-inline-svg> | ||
<span *ngIf="tab.text" class="mt-1 text-lg font-semibold tracking-tight">{{tab.text}}</span> | ||
</a> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.active-tab { | ||
color: var(--blue); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { TabComponent } from './tab.component'; | ||
|
||
describe('TabComponent', () => { | ||
let component: TabComponent; | ||
let fixture: ComponentFixture<TabComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ TabComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(TabComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, OnInit, Input } from '@angular/core'; | ||
import { Tab } from '../utils/symbols'; | ||
|
||
@Component({ | ||
selector: 'niz-tab', | ||
templateUrl: './tab.component.html', | ||
styleUrls: ['./tab.component.scss'], | ||
}) | ||
export class NizTab implements OnInit { | ||
@Input() tab: Tab; | ||
|
||
constructor() {} | ||
|
||
ngOnInit(): void {} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { NizTab } from './tab.component'; | ||
import { NizInlineSvgModule } from '../inline-svg/inline-svg.module'; | ||
import { RouterModule } from '@angular/router'; | ||
|
||
@NgModule({ | ||
declarations: [NizTab], | ||
imports: [CommonModule, RouterModule, NizInlineSvgModule], | ||
exports: [NizTab], | ||
}) | ||
export class NizTabModule {} |
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,3 +1 @@ | ||
.active-tab { | ||
color: var(--blue); | ||
} | ||
|
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,12 +1,11 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { NizTabs } from './tabs.component'; | ||
import { RouterModule } from '@angular/router'; | ||
import { NizInlineSvgModule } from '../inline-svg/inline-svg.module'; | ||
import { NizTabModule } from '../tab/tab.module'; | ||
|
||
@NgModule({ | ||
declarations: [NizTabs], | ||
imports: [CommonModule, RouterModule, NizInlineSvgModule], | ||
imports: [CommonModule, NizTabModule], | ||
exports: [NizTabs], | ||
}) | ||
export class NizTabsModule {} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export interface Tab { | ||
url: string; | ||
logo?: boolean; | ||
text?: string; | ||
routeActive: boolean; | ||
image: string; | ||
hideOnMobile?: boolean; | ||
hideOnDesktop?: boolean; | ||
} |
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