Skip to content

Commit

Permalink
fix(ebay-textbox): update input interface to include textarea-specifi… (
Browse files Browse the repository at this point in the history
  • Loading branch information
WinkeeFace authored Jan 9, 2025
1 parent 846da05 commit 9db2bde
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/wet-wombats-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ebay/ebayui-core": patch
---

Updated the component-browser.ts file to reference shared attributes from tags-html.d.ts and added the Textbox class implementation.
11 changes: 8 additions & 3 deletions src/components/ebay-textbox/component-browser.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import FloatingLabel from "makeup-floating-label";
import type { WithNormalizedProps } from "../../global";
import type { AttrString } from "marko/tags-html";
import type { AttrOnOff, AttrString, AttrStringOrNumber } from "marko/tags-html";

export interface TextboxEvent {
originalEvent: Event;
value: string;
}

interface TextboxInput extends Omit<Marko.Input<"textarea">, `on${string}`> {
interface TextboxInput extends Omit<Marko.Input<"input">, `on${string}`> {
multiline?: boolean;
type?: Marko.Input<"input">["type"];
"input-size"?: "regular" | "large";
Expand All @@ -31,6 +31,11 @@ interface TextboxInput extends Omit<Marko.Input<"textarea">, `on${string}`> {
"on-blur"?: (event: TextboxEvent) => void;
"on-invalid"?: (event: TextboxEvent) => void;
"on-button-click"?: (event: TextboxEvent) => void;
// Fields in textarea that aren't in input that we need to include
autocorrect?: AttrOnOff;
cols?: AttrStringOrNumber;
rows?: AttrStringOrNumber;

}

export interface Input extends WithNormalizedProps<TextboxInput> {}
Expand Down Expand Up @@ -95,4 +100,4 @@ class Textbox extends Marko.Component<Input> {
}
}

export default Textbox;
export default Textbox;

0 comments on commit 9db2bde

Please sign in to comment.