import React, { useState } from "react";
import { RadioButton } from "../../../";

const ControlledRadioButton = () => {
  const [checked, setChecked] = useState(false);

  return (
    <div className="m-5">
      <RadioButton
        className="my-class-name"
        name="buttonName"
        value="100"
        label="Click the button"
        onSelected={() => setChecked(true)}
        checked={checked}
      />
      <button onClick={() => setChecked(false)}>Reset</button>
    </div>
  );
};

export default <ControlledRadioButton />;
