From 4530c7d5ab7e513c4901c81b5b1c016b40ba36a0 Mon Sep 17 00:00:00 2001 From: Ivan Voskoboinyk Date: Wed, 14 Feb 2024 17:16:36 +0200 Subject: [PATCH] [DEV-12376] Add `disabled` property --- .../ui/src/components/SubscriptionCta/SubscriptionCta.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/components/SubscriptionCta/SubscriptionCta.tsx b/packages/ui/src/components/SubscriptionCta/SubscriptionCta.tsx index 58a61bd31..b37b4379f 100644 --- a/packages/ui/src/components/SubscriptionCta/SubscriptionCta.tsx +++ b/packages/ui/src/components/SubscriptionCta/SubscriptionCta.tsx @@ -6,6 +6,7 @@ import { Input } from '../Input'; export function SubscriptionCta({ className, + disabled = false, error, value, onChange, @@ -34,9 +35,10 @@ export function SubscriptionCta({ placeholder={intl['subscription.labelEmail'] ?? 'Enter your email'} value={value} onChange={(event) => onChange(event.target.value)} + readOnly={disabled} /> {children} - @@ -53,6 +55,7 @@ export namespace SubscriptionCta { export interface Props { className?: string; + disabled?: boolean; value: string; error?: string; onChange: (value: string) => void;