mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-11-16 01:21:16 +01:00
fix(ui): replace checkbox in signup form with Mantine's Checkbox
- Replaced custom checkbox in `SignupForm` with Mantine's `Checkbox` for consistency - Updated event handler to use `e.currentTarget.checked` - Integrated label prop with translated terms and conditions text for improved readability Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
This commit is contained in:
parent
4708f92145
commit
6d948adb4c
@ -1,6 +1,7 @@
|
||||
import { useEffect } from 'react';
|
||||
import '@app/routes/authShared/auth.css';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Checkbox } from '@mantine/core';
|
||||
import { SignupFieldErrors } from '@app/routes/signup/SignupFormValidation';
|
||||
|
||||
interface SignupFormProps {
|
||||
@ -133,19 +134,20 @@ export default function SignupForm({
|
||||
{/* Terms - only show if showTerms is true */}
|
||||
{showTerms && (
|
||||
<div className="auth-terms">
|
||||
<input
|
||||
<Checkbox
|
||||
id="agree"
|
||||
type="checkbox"
|
||||
checked={agree}
|
||||
onChange={(e) => setAgree?.(e.target.checked)}
|
||||
onChange={(e) => setAgree?.(e.currentTarget.checked)}
|
||||
className="auth-checkbox"
|
||||
label={
|
||||
<span className="auth-terms-label">
|
||||
{t("legal.iAgreeToThe", 'I agree to all of the')}{' '}
|
||||
<a href="https://www.stirlingpdf.com/terms" target="_blank" rel="noopener noreferrer">
|
||||
{t('legal.terms', 'Terms and Conditions')}
|
||||
</a>
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
<label htmlFor="agree" className="auth-terms-label">
|
||||
{t("legal.iAgreeToThe", 'I agree to all of the')} {" "}
|
||||
<a href="https://www.stirlingpdf.com/terms" target="_blank" rel="noopener noreferrer">
|
||||
{t('legal.terms', 'Terms and Conditions')}
|
||||
</a>
|
||||
</label>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user