forked from UKSOURCE/ipv6
fix 2 form
This commit is contained in:
@@ -9,7 +9,6 @@ type Question = {
|
||||
id: string;
|
||||
type: "rating" | "dropdown" | "scale" | "rating_labeled" | "checkbox_group" | "long_text";
|
||||
label: string;
|
||||
labelVi: string;
|
||||
min?: number;
|
||||
max?: number;
|
||||
placeholder?: string;
|
||||
@@ -127,7 +126,6 @@ export default function FeedbackForm({ data }: { data: FeedbackJson }) {
|
||||
<div key={q.id} className="space-y-4">
|
||||
<div className="space-y-1">
|
||||
<label className="block text-lg font-semibold text-on-surface">{q.label}</label>
|
||||
<p className="text-on-surface-variant/70 italic text-sm">{q.labelVi}</p>
|
||||
</div>
|
||||
|
||||
{q.type === "rating" && (
|
||||
@@ -239,7 +237,7 @@ export default function FeedbackForm({ data }: { data: FeedbackJson }) {
|
||||
{q.type === "long_text" && (
|
||||
<textarea
|
||||
className="w-full bg-surface-container-low border border-white/10 rounded-xl px-5 py-4 text-on-surface focus:outline-none focus:border-primary/50 transition-colors min-h-[120px] resize-none"
|
||||
placeholder="Your message / Ý kiến của bạn..."
|
||||
placeholder="Your message / suggestions..."
|
||||
rows={4}
|
||||
value={form[q.id] || ""}
|
||||
onChange={(e) => updateField(q.id, e.target.value)}
|
||||
@@ -262,17 +260,15 @@ export default function FeedbackForm({ data }: { data: FeedbackJson }) {
|
||||
|
||||
<SubmitToast
|
||||
state={submitState}
|
||||
successTitle="Feedback submitted"
|
||||
successMessage="Thank you for your valuable feedback! It has been successfully recorded."
|
||||
successTitle="Feedback Submitted"
|
||||
successMessage={data.submit.disclaimer}
|
||||
onDismiss={() => {
|
||||
setSubmitState("idle");
|
||||
setForm({});
|
||||
}}
|
||||
/>
|
||||
|
||||
<p className="text-on-surface-variant font-medium text-sm text-center max-w-xl leading-relaxed opacity-80 uppercase tracking-wide">
|
||||
{data.submit.disclaimer}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
|
||||
@@ -171,9 +171,9 @@ export default function RegistrationForm({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="pt-[16px]">
|
||||
<div className="pt-10 border-t border-white/5 flex flex-col items-center gap-6">
|
||||
<button
|
||||
className="w-full gold-gradient-bg py-5 rounded-lg text-on-primary font-[var(--font-display-lg)] text-[18px] font-bold shadow-[0_10px_30px_rgba(197,160,89,0.15)] hover:shadow-[0_15px_40px_rgba(197,160,89,0.25)] hover:-translate-y-0.5 active:translate-y-0 active:scale-[0.98] transition-all disabled:opacity-60 disabled:pointer-events-none"
|
||||
className="gold-gradient-bg text-on-primary w-full md:w-auto px-16 py-5 rounded-xl font-[var(--font-display-lg)] text-xl uppercase tracking-wider hover:shadow-[0_0_30px_rgba(197,160,89,0.4)] transition-all duration-300 active:scale-[0.98] disabled:opacity-60 disabled:pointer-events-none"
|
||||
type="submit"
|
||||
disabled={submitState === "sending"}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user