Files
HKSingleParty/03_source/mobile/src/pages/Demo2FaExample/components/KeypadButton.tsx
2025-06-08 18:40:35 +08:00

32 lines
753 B
TypeScript

import { IonButton, IonCol, IonIcon } from "@ionic/react";
import { backspaceOutline } from "ionicons/icons";
import styles from "./KeypadButton.module.scss";
const KeypadButton = (props: any): JSX.Element => {
const {
small,
value,
remove,
handleClick,
isDisabled = false,
correct,
} = props;
return (
<IonCol size="4" className={styles.keypadButton}>
<IonButton
disabled={(!small || correct) && isDisabled}
className={`${styles.keypadButton} ${
small && styles.smallKeypadButton
}`}
onClick={handleClick}
>
{!remove && value}
{remove && <IonIcon icon={backspaceOutline} />}
</IonButton>
</IonCol>
);
};
export default KeypadButton;