Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Error in Hds::Flyout & Hds::Modal subcomponents #2511

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/dull-lamps-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@hashicorp/design-system-components": minor
---

`Hds::DialogPrimitive::Description`
`Hds::DialogPrimitive::Body`
`Hds::Modal::Body`
- Fixed error caused by not passing the `args` argument from the constructor to `super`
zamoore marked this conversation as resolved.
Show resolved Hide resolved
7 changes: 5 additions & 2 deletions packages/components/src/components/hds/flyout/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ import Component from '@glimmer/component';
import { deprecate } from '@ember/debug';

export interface HdsFlyoutBodySignature {
Args: {
contextualClass?: string;
};
zamoore marked this conversation as resolved.
Show resolved Hide resolved
Blocks: {
default: [];
};
Element: HTMLDivElement;
}

export default class HdsFlyoutBody extends Component<HdsFlyoutBodySignature> {
constructor(owner: unknown) {
super(owner, {});
constructor(owner: unknown, args: HdsFlyoutBodySignature['Args']) {
super(owner, args);

deprecate(
'The `Hds::Flyout::Body` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Body` as one-to-one replacement.',
Expand Down
7 changes: 5 additions & 2 deletions packages/components/src/components/hds/flyout/description.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ import { deprecate } from '@ember/debug';
import type { HdsTextBodySignature } from '../text/body';

export interface HdsFlyoutDescriptionSignature {
Args: {
contextualClass?: string;
};
Blocks: {
default: [];
};
Element: HdsTextBodySignature['Element'];
}

export default class HdsFlyoutDescription extends Component<HdsFlyoutDescriptionSignature> {
constructor(owner: unknown) {
super(owner, {});
constructor(owner: unknown, args: HdsFlyoutDescriptionSignature['Args']) {
super(owner, args);

deprecate(
'The `Hds::Flyout::Description` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Description` as one-to-one replacement.',
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/components/hds/flyout/footer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { deprecate } from '@ember/debug';

export interface HdsFlyoutFooterSignature {
Args: {
contextualClass?: string;
onDismiss?: (event: MouseEvent) => void;
};
Blocks: {
Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/components/hds/flyout/header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import type { HdsIconSignature } from '../icon';

export interface HdsFlyoutHeaderSignature {
Args: {
contextualClassPrefix?: string;
id?: string;
tagline?: string;
titleTag?: string;
onDismiss: (event: MouseEvent) => void;
icon?: HdsIconSignature['Args']['name'];
};
Expand Down
7 changes: 5 additions & 2 deletions packages/components/src/components/hds/modal/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ import Component from '@glimmer/component';
import { deprecate } from '@ember/debug';

export interface HdsModalBodySignature {
Args: {
contextualClass?: string;
};
Blocks: {
default: [];
};
Element: HTMLDivElement;
}

export default class HdsModalBody extends Component<HdsModalBodySignature> {
constructor(owner: unknown) {
super(owner, {});
constructor(owner: unknown, args: HdsModalBodySignature['Args']) {
super(owner, args);

deprecate(
'The `Hds::Modal::Body` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Body` as one-to-one replacement.',
Expand Down