AdminUpdateButtonRow.tsx 707 B

123456789101112131415161718192021222324252627282930
  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. type={props.type ?? 'button'}
  16. className="btn btn-primary"
  17. onClick={props.onClick}
  18. disabled={props.disabled ?? false}
  19. >
  20. {t('Update')}
  21. </button>
  22. </div>
  23. </div>
  24. );
  25. };
  26. export default AdminUpdateButtonRow;