AdminUpdateButtonRow.tsx 769 B

1234567891011121314151617181920212223242526272829303132
  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;