Skip to content

Commit

Permalink
Merge branch 'main' into feat/card-remove-baseclass
Browse files Browse the repository at this point in the history
  • Loading branch information
brianferry committed Sep 21, 2023
2 parents f1ef148 + 45a1a27 commit 08a04d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .changeset/pf-text-input-placeholder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/elements": minor
---
`<pf-text-input>`: added `placeholder` attribute
4 changes: 4 additions & 0 deletions elements/pf-text-input/pf-text-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ export class PfTextInput extends LitElement {
/** Flag to show if the input is read only. */
@property({ type: Boolean, reflect: true }) readonly = false;

/** Input placeholder. */
@property() placeholder?: string;

/** Value of the input. */
@property() value = '';

Expand Down Expand Up @@ -217,6 +220,7 @@ export class PfTextInput extends LitElement {
?readonly="${this.readonly}"
?required="${this.required}"
aria-label="${this.#derivedLabel}"
placeholder="${ifDefined(this.placeholder)}"
type="${ifDefined(this.type)}"
.value="${this.value}"
style="${ifDefined(this.customIconUrl && styleMap({
Expand Down

0 comments on commit 08a04d0

Please sign in to comment.