mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-28 04:08:47 +02:00
[CL-111] remove h3 from bit-callout (#5853)
* aside added and h3 turned into header Co-authored-by: willmartian <contact@willmartian.com>
This commit is contained in:
parent
f2cd8dd90d
commit
fe6c2fbf80
@ -1,14 +1,16 @@
|
|||||||
<div
|
<aside
|
||||||
class="tw-mb-4 tw-box-border tw-rounded tw-border tw-border-l-8 tw-border-solid tw-border-secondary-300 tw-bg-background-alt tw-px-5 tw-py-3 tw-leading-5 tw-text-main"
|
class="tw-mb-4 tw-box-border tw-rounded tw-border tw-border-l-8 tw-border-solid tw-border-secondary-300 tw-bg-background-alt tw-px-5 tw-py-3 tw-leading-5 tw-text-main"
|
||||||
[ngClass]="calloutClass"
|
[ngClass]="calloutClass"
|
||||||
|
[attr.aria-labelledby]="titleId"
|
||||||
>
|
>
|
||||||
<h3
|
<header
|
||||||
|
id="{{ titleId }}"
|
||||||
class="tw-mb-2 tw-mt-0 tw-text-base tw-font-bold tw-uppercase"
|
class="tw-mb-2 tw-mt-0 tw-text-base tw-font-bold tw-uppercase"
|
||||||
[ngClass]="headerClass"
|
[ngClass]="headerClass"
|
||||||
*ngIf="title"
|
*ngIf="title"
|
||||||
>
|
>
|
||||||
<i class="bwi {{ icon }}" *ngIf="icon" aria-hidden="true"></i>
|
<i class="bwi {{ icon }}" *ngIf="icon" aria-hidden="true"></i>
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</h3>
|
</header>
|
||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
</div>
|
</aside>
|
||||||
|
@ -16,6 +16,9 @@ const defaultI18n: Partial<Record<CalloutTypes, string>> = {
|
|||||||
danger: "error",
|
danger: "error",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Increments for each instance of this component
|
||||||
|
let nextId = 0;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "bit-callout",
|
selector: "bit-callout",
|
||||||
templateUrl: "callout.component.html",
|
templateUrl: "callout.component.html",
|
||||||
@ -25,6 +28,7 @@ export class CalloutComponent implements OnInit {
|
|||||||
@Input() icon: string;
|
@Input() icon: string;
|
||||||
@Input() title: string;
|
@Input() title: string;
|
||||||
@Input() useAlertRole = false;
|
@Input() useAlertRole = false;
|
||||||
|
protected titleId = `bit-callout-title-${nextId++}`;
|
||||||
|
|
||||||
constructor(private i18nService: I18nService) {}
|
constructor(private i18nService: I18nService) {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user