Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dashboard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
red-giant
dashboard
Merge requests
!22
Remove react-intl due failing tests
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Remove react-intl due failing tests
fix-test
into
master
Overview
0
Commits
4
Pipelines
1
Changes
4
Merged
Defendi Alberto
requested to merge
fix-test
into
master
3 years ago
Overview
0
Commits
4
Pipelines
1
Changes
4
Expand
The dependency requires to inject provider for test. To evalue another library for intl
0
0
Merge request reports
Viewing commit
40380a73
Prev
Next
Show latest version
4 files
+
12
−
60
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
Verified
40380a73
Insert default paths
· 40380a73
Defendi Alberto
authored
3 years ago
src/components/AuthUser/SignInForm/InputField.tsx deleted
100644 → 0
+
0
−
46
Options
import
React
,
{
FC
}
from
'
react
'
;
import
{
TextField
}
from
'
@material-ui/core
'
;
import
{
Control
,
Controller
,
FieldValues
}
from
'
react-hook-form
'
;
type
Props
=
{
/**
* Name of the elemement. ex. email, password
*/
name
:
string
;
label
:
string
;
error
:
boolean
;
errorMessage
:
string
;
/**
* react-hook-form control
*/
control
:
Control
<
FieldValues
>
|
undefined
;
rules
:
Partial
<
unknown
>
;
};
export
const
InputField
:
FC
<
Props
>
=
(
props
:
Props
)
=>
{
const
{
name
,
label
,
error
,
errorMessage
,
control
,
rules
}
=
props
;
return
(
<
Controller
name
=
{
name
}
control
=
{
control
}
rules
=
{
rules
}
render
=
{
({
onChange
,
value
})
=>
(
<
TextField
variant
=
"outlined"
margin
=
"normal"
required
fullWidth
id
=
{
name
}
label
=
{
label
}
name
=
{
name
}
onChange
=
{
onChange
}
value
=
{
value
}
autoComplete
=
{
name
}
autoFocus
error
=
{
error
}
helperText
=
{
error
&&
errorMessage
}
/>
)
}
/>
);
};
Loading