Skip to content

Commit 2697a77

Browse files
shleewhiteshleewhite
andauthored
CodeEditor: indicate that [CE].Title and [CE].Description have bound args (#3068)
Co-authored-by: shleewhite <[email protected]>
1 parent ded2fd5 commit 2697a77

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.changeset/rare-items-repeat.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@hashicorp/design-system-components": patch
3+
---
4+
5+
<!-- START components/code-editor -->
6+
`CodeEditor` - fixed the type of the CodeEditor signature to indicate that the `[CE].Title` and `[CE].Description` have bound arguments.
7+
<!-- END -->

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ import { action } from '@ember/object';
99
import { modifier } from 'ember-modifier';
1010
import { guidFor } from '@ember/object/internals';
1111

12+
import HdsCodeEditorDescription from './description.ts';
13+
import HdsCodeEditorTitle from './title.ts';
14+
15+
import type { WithBoundArgs } from '@glint/template';
1216
import type Owner from '@ember/owner';
1317
import type { ComponentLike } from '@glint/template';
1418
import type { HdsCodeEditorSignature as HdsCodeEditorModifierSignature } from '../../../modifiers/hds-code-editor.ts';
@@ -28,8 +32,14 @@ export interface HdsCodeEditorSignature {
2832
Blocks: {
2933
default: [
3034
{
31-
Title?: ComponentLike<HdsCodeEditorTitleSignature>;
32-
Description?: ComponentLike<HdsCodeEditorDescriptionSignature>;
35+
Title?: WithBoundArgs<
36+
typeof HdsCodeEditorTitle,
37+
'onInsert' | 'editorId'
38+
>;
39+
Description?: WithBoundArgs<
40+
typeof HdsCodeEditorDescription,
41+
'onInsert' | 'editorId'
42+
>;
3343
Generic?: ComponentLike<HdsCodeEditorGenericSignature>;
3444
},
3545
];

0 commit comments

Comments
 (0)