Skip to content

[bug] feat(widgets): Add getMessage(), getVariant(), getTitle(), and setTitle() methods to Callout widget #3077

Description

@Harshithk951

Bug Description

The Callout widget in @termuijs/widgets provides setMessage and setVariant setters, but lacks getter methods (getMessage, getVariant, getTitle) and a setTitle setter for dynamic title updates and state inspection.

Proposed Solution

Add the following methods to Callout in packages/widgets/src/feedback/Callout.ts:

getMessage(): string {
    return this._message;
}

getVariant(): CalloutVariant {
    return this._variant;
}

getTitle(): string {
    return this._title;
}

setTitle(title: string): void {
    if (this._title === title) return;
    this._title = title;
    this.markDirty();
}

Package Scope

packages/widgets

Before submitting PR

  • Run bun run build && bun vitest run && bun run typecheck
  • Confined to packages/widgets

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

assignedIssue claimed by a contributor.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions