import styles from "./styles.module.scss";
import React from "react";

const RadioBtn=({value,selected,onChange,children,className=''})=>{
    return (
        <button type={"button"} value={value} className={`${styles.radio_btn} ${selected?styles.active:''} ${className}`} onClick={()=>{
            if(onChange)onChange(value);
        }}>
            <div className={styles.circle}>
                <div className={styles.dot}/>
            </div>
            {children}
        </button>
    )
}
export default RadioBtn;
