-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(form-input-text): 🎉 add form input-text component and update for…
…m steps
- Loading branch information
1 parent
126ff62
commit b7489b2
Showing
8 changed files
with
79 additions
and
42 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React, { ReactElement } from "react"; | ||
import InputError from "../InputError/InputError"; | ||
import InputText from "../InputText/InputText"; | ||
import InfoTip from "../InfoTip/InfoTip"; | ||
|
||
interface IFormInputText { | ||
labelText: string; | ||
InfoTipText: string; | ||
formikProps: any; | ||
disabled?: boolean; | ||
inputHoverText?: string; | ||
validationError?: any; | ||
validationTouched?: any; | ||
} | ||
|
||
export default function FormInputText({ | ||
labelText, | ||
InfoTipText, | ||
formikProps, | ||
disabled, | ||
inputHoverText, | ||
validationError, | ||
validationTouched, | ||
}: IFormInputText): ReactElement { | ||
return ( | ||
<div className="flex flex-col gap-2"> | ||
<div className="flex gap-1 min-w-fit text-xs font-medium text-layer-light-700"> | ||
{labelText} | ||
<InfoTip content={InfoTipText} /> | ||
</div> | ||
<InputText | ||
{...formikProps} | ||
className="!text-sm" | ||
disabled={disabled} | ||
inputHoverText={inputHoverText} | ||
/> | ||
<InputError error={validationError} touched={validationTouched} /> | ||
</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
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