-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add header for angular and vue for testing
- Loading branch information
Showing
11 changed files
with
3,243 additions
and
3,135 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
75 changes: 75 additions & 0 deletions
75
showcases/angular-showcase/src/app/components/header/header.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 |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<app-default-component | ||
title="DBHeader" | ||
[variants]="variants" | ||
[exampleTemplate]="exampleTemplate" | ||
> | ||
<ng-template | ||
#exampleTemplate | ||
let-exampleProps="exampleProps" | ||
let-exampleName="exampleName" | ||
let-exampleIndex="exampleIndex" | ||
let-variantIndex="variantIndex" | ||
> | ||
<db-header | ||
[width]="exampleProps?.width" | ||
[forceMobile]="exampleProps.forceMobile" | ||
> | ||
<db-brand brand> | ||
@if (!exampleProps.example || exampleProps.withName) { | ||
DBHeader | ||
} | ||
</db-brand> | ||
<ng-container *dbNavigation> | ||
@if (!exampleProps.example || exampleProps.withNavigation) { | ||
<db-navigation> | ||
<db-navigation> | ||
<db-navigation-item icon="user"> | ||
<a href="#" *dbNavigationContent | ||
>{{ exampleName }} | ||
</a> | ||
</db-navigation-item> | ||
<db-navigation-item [disabled]="true"> | ||
<a href="#" *dbNavigationContent | ||
>{{ exampleName }} disabled | ||
</a> | ||
</db-navigation-item> | ||
</db-navigation> | ||
</db-navigation> | ||
} | ||
</ng-container> | ||
<ng-container *dbMetaNavigation> | ||
@if (!exampleProps.example) { | ||
<db-link href="#">Imprint</db-link> | ||
<db-link href="#">Help</db-link> | ||
} | ||
</ng-container> | ||
<ng-container primary-action> | ||
@if (!exampleProps.example) { | ||
<DBButton | ||
icon="magnifying_glass" | ||
variant="ghost" | ||
[noText]="true" | ||
>Search</DBButton | ||
> | ||
} | ||
</ng-container> | ||
<ng-container *secondaryAction> | ||
@if (!exampleProps.example) { | ||
<DBButton icon="user" variant="ghost" [noText]="true"> | ||
Profile | ||
</DBButton> | ||
<DBButton icon="bell" variant="ghost" [noText]="true"> | ||
Notification | ||
</DBButton> | ||
<DBButton | ||
icon="question_mark_circle" | ||
variant="ghost" | ||
[noText]="true" | ||
> | ||
Help | ||
</DBButton> | ||
} | ||
</ng-container> | ||
</db-header> | ||
</ng-template> | ||
</app-default-component> |
37 changes: 37 additions & 0 deletions
37
showcases/angular-showcase/src/app/components/header/header.component.ts
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,37 @@ | ||
import { Component } from '@angular/core'; | ||
import defaultComponentVariants from '../../../../../shared/header.json'; | ||
import { DefaultComponent } from '../default.component'; | ||
import { | ||
DBBrand, | ||
DBButton, | ||
DBHeader, | ||
DBLink, | ||
DBNavigation, | ||
DBNavigationItem, | ||
MetaNavigationDirective, | ||
NavigationContentDirective, | ||
NavigationDirective, | ||
SecondaryActionDirective | ||
} from '../../../../../../output/angular/src'; | ||
|
||
@Component({ | ||
selector: 'app-header', | ||
templateUrl: './header.component.html', | ||
imports: [ | ||
DefaultComponent, | ||
DBBrand, | ||
DBButton, | ||
DBHeader, | ||
DBLink, | ||
DBNavigation, | ||
DBNavigationItem, | ||
SecondaryActionDirective, | ||
NavigationDirective, | ||
MetaNavigationDirective, | ||
NavigationContentDirective | ||
], | ||
standalone: true | ||
}) | ||
export class HeaderComponent { | ||
variants = defaultComponentVariants; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<script setup lang="ts"> | ||
import DefaultComponent from "../DefaultComponent.vue"; | ||
import defaultComponentVariants from "../../../../shared/header.json"; | ||
import { | ||
DBBrand, | ||
DBButton, | ||
DBHeader, | ||
DBLink, | ||
DBNavigation, | ||
DBNavigationItem | ||
} from "../../../../../output/vue/src"; | ||
</script> | ||
|
||
<template> | ||
<DefaultComponent title="DBHeader" :variants="defaultComponentVariants"> | ||
<template | ||
#example="{ exampleIndex, variantIndex, exampleName, exampleProps }" | ||
> | ||
<DBHeader | ||
:width="exampleProps.width" | ||
:force-mobile="exampleProps.forceMobile" | ||
> | ||
<template v-slot:brand> | ||
<DBBrand> | ||
<template | ||
v-if=" | ||
!exampleProps.example || exampleProps.withName | ||
" | ||
> | ||
Showcase | ||
</template> | ||
</DBBrand> | ||
</template> | ||
<template | ||
v-if="!exampleProps.example || exampleProps.withNavigation" | ||
> | ||
<DBNavigation> | ||
<DBNavigationItem icon="user"> | ||
<a href="#">{{ exampleName }}</a> | ||
</DBNavigationItem> | ||
<DBNavigationItem :disabled="true"> | ||
<a href="#">{{ exampleName }} disabled</a> | ||
</DBNavigationItem> | ||
</DBNavigation> | ||
</template> | ||
<template v-slot:primary-action> | ||
<template v-if="!exampleProps.example"> | ||
<DBButton | ||
icon="magnifying_glass" | ||
variant="ghost" | ||
:no-text="true" | ||
> | ||
Search | ||
</DBButton></template | ||
> | ||
</template> | ||
<template v-slot:secondary-action> | ||
<template v-if="!exampleProps.example"> | ||
<DBButton icon="user" variant="ghost" :no-text="true"> | ||
Profile | ||
</DBButton> | ||
<DBButton icon="bell" variant="ghost" :no-text="true"> | ||
Notification | ||
</DBButton> | ||
<DBButton | ||
icon="question_mark_circle" | ||
variant="ghost" | ||
:no-text="true" | ||
> | ||
Help | ||
</DBButton></template | ||
> | ||
</template> | ||
<template v-slot:meta-navigation> | ||
<template v-if="!exampleProps.example"> | ||
<DBLink href="#">Imprint</DBLink> | ||
<DBLink href="#">Help</DBLink></template | ||
> | ||
</template> | ||
</DBHeader> | ||
</template> | ||
</DefaultComponent> | ||
</template> |
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