Skip to content

Commit

Permalink
feat: placeholder option for textbox template
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert committed Sep 19, 2021
1 parent f15f23e commit 74fb95d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/textbox/bem.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ export const defaultArgs = {
invalid: false,
readOnly: false,
required: false,
placeholder: '',
value: '',
};

export const TextBox = ({
disabled = false,
focus = false,
invalid = false,
placeholder = '',
readOnly = false,
required = false,
value = '',
Expand All @@ -29,4 +31,4 @@ export const TextBox = ({
invalid && 'utrecht-textbox--invalid',
readOnly && 'utrecht-textbox--readonly',
required && 'utrecht-textbox--required',
)}" value="${value}">`;
)}"${placeholder ? ` placeholder="${placeholder}"` : ''} value="${value}">`;

0 comments on commit 74fb95d

Please sign in to comment.