AdminUpdateButtonRow.tsx 767 B

12345678910111213141516171819202122232425262728293031
  1. import React, { type JSX } from 'react';
  2. import { useTranslation } from 'next-i18next';
  3. type Props = {
  4. onClick?: () => void;
  5. disabled?: boolean;
  6. type?: 'button' | 'submit' | 'reset';
  7. };
  8. const AdminUpdateButtonRow = (props: Props): JSX.Element => {
  9. const { t } = useTranslation('admin');
  10. return (
  11. <div className="row my-3">
  12. <div className="col-md-3"></div>
  13. <div className="col-md-9">
  14. <button
  15. // eslint-disable-next-line react/button-has-type
  16. type={props.type ?? 'button'}
  17. className="btn btn-primary"
  18. onClick={props.onClick}
  19. disabled={props.disabled ?? false}
  20. >
  21. {t('Update')}
  22. </button>
  23. </div>
  24. </div>
  25. );
  26. };
  27. export default AdminUpdateButtonRow;