import React from "react"; import { CustomStackFullWidth } from "styled-components/CustomStyles.style"; import { Stack } from "@mui/system"; import RadioButtonUncheckedIcon from "@mui/icons-material/RadioButtonUnchecked"; import { alpha, Typography } from "@mui/material"; import CustomImageContainer from "components/CustomImageContainer"; import CheckCircleIcon from "@mui/icons-material/CheckCircle"; const StoreRegPaymentCard = ({ method, selectedMethod, setSelectedMethod }) => { const handleSelect = () => { // Toggle the selection setSelectedMethod((prevMethod) => prevMethod === method?.gateway ? null : method?.gateway ); }; return ( alpha(theme.palette.neutral[400], 0.4), borderRadius: "8px", cursor: "pointer", // Change cursor to pointer to indicate clickability }} justifyContent="center" onClick={handleSelect} > {selectedMethod === method?.gateway ? ( theme.palette.primary.main }} /> ) : ( alpha(theme.palette.neutral[400], 0.4) }} /> )} {method?.gateway_title} ); }; export default StoreRegPaymentCard;