|
|
|
@ -1,9 +1,7 @@ |
|
|
|
|
// it has style inside index.scss ---> // Start Input Component && end Input Component
|
|
|
|
|
|
|
|
|
|
import React, { useState } from "react"; |
|
|
|
|
import _ from "lodash"; |
|
|
|
|
import "./index.scss"; |
|
|
|
|
|
|
|
|
|
import tick from "./tick.png"; |
|
|
|
|
import danger from "./danger.png"; |
|
|
|
|
|
|
|
|
|
const langDetector = (lang, option1, option2) => { |
|
|
|
|
return lang === "fa" ? option1 : option2; |
|
|
|
@ -88,7 +86,7 @@ export default function Input(props) { |
|
|
|
|
/> |
|
|
|
|
{!status && value && ( |
|
|
|
|
<img |
|
|
|
|
src={danger} |
|
|
|
|
src="images/danger.png" |
|
|
|
|
alt={langDetector(lang, "اشتباه", "wrong")} |
|
|
|
|
className={_.join( |
|
|
|
|
[ |
|
|
|
@ -101,7 +99,7 @@ export default function Input(props) { |
|
|
|
|
)} |
|
|
|
|
{status && value && ( |
|
|
|
|
<img |
|
|
|
|
src={tick} |
|
|
|
|
src="images/tick.png" |
|
|
|
|
alt={langDetector(lang, "درست", "right")} |
|
|
|
|
className={_.join( |
|
|
|
|
[ |
|
|
|
|