-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
5fc2b22
commit c732f93
Showing
7 changed files
with
76 additions
and
41 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
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
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
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
16 changes: 16 additions & 0 deletions
16
apps/audius-client/packages/web/src/components/form-fields/TextAreaField.tsx
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { useField } from 'formik' | ||
|
||
import { TextAreaV2, TextAreaV2Props } from 'components/data-entry/TextAreaV2' | ||
|
||
type TextAreaFieldProps = TextAreaV2Props & { | ||
name: string | ||
} | ||
|
||
export const TextAreaField = (props: TextAreaFieldProps) => { | ||
const { name, ...other } = props | ||
const [field, meta] = useField(name) | ||
|
||
const hasError = Boolean(meta.touched && meta.error) | ||
|
||
return <TextAreaV2 {...field} error={hasError} {...other} /> | ||
} |
16 changes: 16 additions & 0 deletions
16
apps/audius-client/packages/web/src/components/form-fields/TextField.tsx
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { useField } from 'formik' | ||
|
||
import { InputV2, InputV2Props } from 'components/data-entry/InputV2' | ||
|
||
type TextFieldProps = InputV2Props & { | ||
name: string | ||
} | ||
|
||
export const TextField = (props: TextFieldProps) => { | ||
const { name, ...other } = props | ||
const [field, meta] = useField(name) | ||
|
||
const hasError = Boolean(meta.touched && meta.error) | ||
|
||
return <InputV2 {...field} error={hasError} {...other} /> | ||
} |
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