File tree 4 files changed +39
-17
lines changed
components/hds/dismiss-button
4 files changed +39
-17
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @hashicorp/design-system-components " : minor
3
+ ---
4
+
5
+ ` DismissButton ` - Converted component to TypeScript
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright (c) HashiCorp, Inc.
3
+ * SPDX-License-Identifier: MPL-2.0
4
+ */
5
+
6
+ import Component from '@glimmer/component' ;
7
+
8
+ export interface HdsDismissButtonSignature {
9
+ Args : {
10
+ ariaLabel ?: string ;
11
+ } ,
12
+ Element : HTMLButtonElement ;
13
+ }
14
+
15
+ export default class HdsDismissButtonIndexComponent extends Component < HdsDismissButtonSignature > {
16
+ /**
17
+ * @param ariaLabel
18
+ * @type {string }
19
+ * @default 'Dismiss'
20
+ */
21
+ get ariaLabel ( ) {
22
+ return this . args . ariaLabel ?? 'Dismiss' ;
23
+ }
24
+ }
25
+
26
+ declare module '@glint/environment-ember-loose/registry' {
27
+ export default interface Registry {
28
+ 'Hds::DismissButton' : typeof HdsDismissButtonIndexComponent ;
29
+ 'hds/dismiss-button' : typeof HdsDismissButtonIndexComponent ;
30
+ 'HdsDismissButton' : typeof HdsDismissButtonIndexComponent ;
31
+ }
32
+ }
Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
import type HdsButtonIndexComponent from './components/hds/button' ;
7
+ import type HdsDismissButtonIndexComponent from './components/hds/dismiss-button' ;
7
8
import type HdsInteractiveIndexComponent from './components/hds/interactive' ;
8
9
9
10
export default interface HdsComponentsRegistry {
10
11
HdsButtonComponent : typeof HdsButtonIndexComponent ;
12
+ HdsDismissComponent : typeof HdsDismissButtonIndexComponent ;
11
13
HdsInteractiveComponent : typeof HdsInteractiveIndexComponent ;
12
14
}
You can’t perform that action at this time.
0 commit comments