Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Olive
olive-frontend
Commits
ebbd39a5
Commit
ebbd39a5
authored
4 years ago
by
Filipe Oliveira
Browse files
Options
Download
Email Patches
Plain Diff
refactor(Input): receive InputProps via props
parent
ed990bdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/Input/index.js
+12
-1
src/components/Input/index.js
with
12 additions
and
1 deletion
+12
-1
src/components/Input/index.js
View file @
ebbd39a5
...
...
@@ -3,7 +3,15 @@ import { TextField } from '@material-ui/core';
import
useStyles
from
'
./styles
'
;
import
PropTypes
from
'
prop-types
'
;
function
Input
({
rows
,
multiline
,
variant
,
label
,
placeholder
,
...
others
})
{
function
Input
({
rows
,
multiline
,
variant
,
label
,
placeholder
,
InputProps
,
...
others
})
{
const
classes
=
useStyles
();
return
(
...
...
@@ -18,6 +26,7 @@ function Input({ rows, multiline, variant, label, placeholder, ...others }) {
classes
,
className
:
classes
.
input
,
disableUnderline
:
true
,
...
InputProps
,
}}
{...
others
}
/
>
...
...
@@ -30,6 +39,7 @@ Input.propTypes = {
rows
:
PropTypes
.
number
,
multiline
:
PropTypes
.
bool
,
variant
:
PropTypes
.
string
,
InputProps
:
PropTypes
.
object
,
};
// Defina aqui o valor padrão de cada prop
...
...
@@ -39,6 +49,7 @@ Input.defaultProps = {
multiline
:
false
,
variant
:
'
filled
'
,
placeholder
:
undefined
,
InputProps
:
{},
};
export
default
Input
;
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment