Skip to content

Commit

Permalink
feat: adds validOutline prop to Input field
Browse files Browse the repository at this point in the history
  • Loading branch information
R-romero committed Jan 26, 2022
1 parent 08a7116 commit 68c2b91
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/assets/scss/_input-text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
margin: 0;
}
}

&.valid {
@apply border-green2;
}
}

.icon {
Expand Down
7 changes: 7 additions & 0 deletions src/components/Input/Input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
search: inputType === 'search',
hasIconVisibility: controlVisibility,
'no-arrows': noArrows,
valid: validOutline,
}"
data-testid="input"
:disabled="disabled"
Expand Down Expand Up @@ -136,6 +137,12 @@ export default {
default: null,
},
/** Provides a green "valid" border to the input */
validOutline: {
type: Boolean,
default: false,
},
/** Specify the type of the Input: <br/> "date" | "email" | "password" | "search" | "tel" | "text" | "time" | "url" | "number" */
type: {
default: 'text',
Expand Down

0 comments on commit 68c2b91

Please sign in to comment.