29 lines
626 B
TypeScript
29 lines
626 B
TypeScript
import { IonCol } from "@ionic/react";
|
|
import styles from "./KeypadInput.module.scss";
|
|
|
|
const KeypadInput = (props: any): JSX.Element => {
|
|
const {
|
|
value,
|
|
isActive = false,
|
|
isFilled = false,
|
|
incorrect,
|
|
correct,
|
|
} = props;
|
|
|
|
return (
|
|
<IonCol size="2">
|
|
<div
|
|
className={`${styles.keypadInput} ${isActive && styles.active} ${
|
|
isFilled && styles.filled
|
|
} ${incorrect && styles.incorrect} ${correct && styles.correct}`}
|
|
onClick={props.handleChange}
|
|
>
|
|
{value}
|
|
{!isFilled && "0"}
|
|
</div>
|
|
</IonCol>
|
|
);
|
|
};
|
|
|
|
export default KeypadInput;
|