RadioButtonForSerchUserOption.jsx 948 B

123456789101112131415161718192021222324252627282930313233
  1. import React from 'react';
  2. import { useTranslation } from 'next-i18next';
  3. import PropTypes from 'prop-types';
  4. const RadioButtonForSerchUserOption = (props) => {
  5. const { searchType } = props;
  6. const { t } = useTranslation();
  7. return (
  8. <div className="form-check form-check-inline" key={`${searchType}Match`}>
  9. <input
  10. type="radio"
  11. id={`${searchType}Match`}
  12. className="form-check-input"
  13. checked={props.checked}
  14. onChange={props.onChange}
  15. />
  16. <label
  17. className="form-label text-capitalize form-check-label ms-3"
  18. htmlFor={`${searchType}Match`}
  19. >
  20. {t(`admin:user_group_management.add_modal.${searchType}_match`)}
  21. </label>
  22. </div>
  23. );
  24. };
  25. RadioButtonForSerchUserOption.propTypes = {
  26. searchType: PropTypes.string.isRequired,
  27. checked: PropTypes.bool.isRequired,
  28. onChange: PropTypes.func.isRequired,
  29. };
  30. export default RadioButtonForSerchUserOption;