Skip to content

Commit 5c1ada7

Browse files
authored
CodeBlock - Update signature to use WithBoundArgs (#2925)
1 parent 879a277 commit 5c1ada7

File tree

1 file changed

+12
-3
lines changed
  • packages/components/src/components/hds/code-block

1 file changed

+12
-3
lines changed

packages/components/src/components/hds/code-block/index.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@ import { modifier } from 'ember-modifier';
1515
import Prism from 'prismjs';
1616

1717
import type { SafeString } from '@ember/template';
18-
import type { ComponentLike } from '@glint/template';
18+
import type { WithBoundArgs } from '@glint/template';
1919

2020
import type { HdsCodeBlockTitleSignature } from './title';
2121
import type { HdsCodeBlockDescriptionSignature } from './description';
2222
import { HdsCodeBlockLanguageValues } from './types.ts';
2323
import type { HdsCodeBlockLanguages } from './types.ts';
2424
import type { HdsCopyButtonSignature } from '../copy/button/index.ts';
2525

26+
import HdsCodeBlockTitleComponent from './title.ts';
27+
import HdsCodeBlockDescriptionComponent from './description.ts';
28+
2629
import 'prismjs/plugins/line-numbers/prism-line-numbers';
2730
import 'prismjs/plugins/line-highlight/prism-line-highlight';
2831

@@ -63,8 +66,14 @@ export interface HdsCodeBlockSignature {
6366
Blocks: {
6467
default: [
6568
{
66-
Title?: ComponentLike<HdsCodeBlockTitleSignature>;
67-
Description?: ComponentLike<HdsCodeBlockDescriptionSignature>;
69+
Title?: WithBoundArgs<
70+
typeof HdsCodeBlockTitleComponent,
71+
'didInsertNode'
72+
>;
73+
Description?: WithBoundArgs<
74+
typeof HdsCodeBlockDescriptionComponent,
75+
'didInsertNode'
76+
>;
6877
},
6978
];
7079
};

0 commit comments

Comments
 (0)