-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: replaced deprecated Paragon form components
Main issue: openedx/wg-frontend#102 PR: #761
- Loading branch information
1 parent
5792440
commit b6a2d3e
Showing
5 changed files
with
161 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 54 additions & 46 deletions
100
src/components/RenderInputTextField/__snapshots__/RenderInputTextField.test.jsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,61 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`RenderInputTextField renders html for number type 1`] = ` | ||
<asInput(withDeprecatedProps(InputText)) | ||
dangerIconDescription="" | ||
disabled={false} | ||
inline={false} | ||
isValid={true} | ||
label="TestLabel" | ||
maxLength="" | ||
name="Test" | ||
onBlur={[Function]} | ||
onChange={[Function]} | ||
onKeyPress={[Function]} | ||
pattern={null} | ||
placeholder="" | ||
required={false} | ||
themes={ | ||
Array [ | ||
"danger", | ||
] | ||
} | ||
type="number" | ||
validationMessage="" | ||
value="" | ||
/> | ||
<div | ||
className="pgn__form-group" | ||
> | ||
<FormGroupContextProvider | ||
controlId="Test-text-label" | ||
isInvalid={false} | ||
isValid={false} | ||
> | ||
<FormLabel | ||
isInline={false} | ||
> | ||
TestLabel | ||
</FormLabel> | ||
<ForwardRef | ||
as="input" | ||
disabled={false} | ||
id="Test-text-label" | ||
maxLength="" | ||
name="Test" | ||
pattern={null} | ||
placeholder="" | ||
plaintext={false} | ||
required={false} | ||
type="number" | ||
/> | ||
</FormGroupContextProvider> | ||
</div> | ||
`; | ||
|
||
exports[`RenderInputTextField renders html for text 1`] = ` | ||
<asInput(withDeprecatedProps(InputText)) | ||
dangerIconDescription="" | ||
disabled={false} | ||
inline={false} | ||
isValid={true} | ||
label="TestLabel" | ||
maxLength="" | ||
name="Test" | ||
onBlur={[Function]} | ||
onChange={[Function]} | ||
onKeyPress={[Function]} | ||
pattern={null} | ||
placeholder="" | ||
required={false} | ||
themes={ | ||
Array [ | ||
"danger", | ||
] | ||
} | ||
type="text" | ||
validationMessage="" | ||
value="" | ||
/> | ||
<div | ||
className="pgn__form-group" | ||
> | ||
<FormGroupContextProvider | ||
controlId="Test-text-label" | ||
isInvalid={false} | ||
isValid={false} | ||
> | ||
<FormLabel | ||
isInline={false} | ||
> | ||
TestLabel | ||
</FormLabel> | ||
<ForwardRef | ||
as="input" | ||
disabled={false} | ||
id="Test-text-label" | ||
maxLength="" | ||
name="Test" | ||
pattern={null} | ||
placeholder="" | ||
plaintext={false} | ||
required={false} | ||
type="text" | ||
/> | ||
</FormGroupContextProvider> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 27 additions & 26 deletions
53
src/components/RenderSelectField/__snapshots__/RenderSelectField.test.jsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`RenderSelectField renders html for select field 1`] = ` | ||
<asInput(withDeprecatedProps(InputSelect)) | ||
dangerIconDescription="" | ||
disabled={false} | ||
inline={false} | ||
isValid={true} | ||
label="TestLabel" | ||
name="Test" | ||
onBlur={[Function]} | ||
onChange={[Function]} | ||
onKeyPress={[Function]} | ||
options={ | ||
Array [ | ||
"one", | ||
"two", | ||
"three", | ||
] | ||
} | ||
required={false} | ||
themes={ | ||
Array [ | ||
"danger", | ||
] | ||
} | ||
validationMessage="" | ||
value="" | ||
/> | ||
<div | ||
className="pgn__form-group" | ||
> | ||
<FormGroupContextProvider | ||
controlId="Test-text-label" | ||
isInvalid={false} | ||
isValid={false} | ||
> | ||
<FormLabel | ||
isInline={false} | ||
> | ||
TestLabel | ||
</FormLabel> | ||
<ForwardRef | ||
as="select" | ||
disabled={false} | ||
label="TestLabel" | ||
name="Test" | ||
plaintext={false} | ||
required={false} | ||
> | ||
<option /> | ||
<option /> | ||
<option /> | ||
</ForwardRef> | ||
</FormGroupContextProvider> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters