Skip to content

Commit

Permalink
Merge branch 'main' into lp-add-target-by-country
Browse files Browse the repository at this point in the history
  • Loading branch information
LAKSHMIRPILLAI authored Jan 22, 2025
2 parents e736633 + cea1129 commit aad6541
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ const useStyles = makeStyles(({ palette, spacing }: Theme) => ({
},
}));

const HEADER_DEFAULT_HELPER_TEXT = 'Assitive text';
const BODY_DEFAULT_HELPER_TEXT = 'Main banner message paragraph';
const HIGHTLIGHTED_TEXT_HELPER_TEXT = 'Final sentence of body copy';

Expand Down Expand Up @@ -223,11 +222,7 @@ const VariantContentEditor: React.FC<VariantContentEditorProps> = ({
return (
<RichTextEditorSingleLine
error={errors.heading !== undefined}
helperText={
errors.heading
? errors.heading.message || errors.heading.type
: HEADER_DEFAULT_HELPER_TEXT
}
helperText={errors.heading ? errors.heading.message || errors.heading.type : ''}
copyData={data.value}
updateCopy={pars => {
data.onChange(pars);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ const getUseStyles = (shouldAddPadding: boolean) => {

const PARAGRAPHS_MAX_LENGTH = 2000;

const HEADER_DEFAULT_HELPER_TEXT = `Assitive text`;
const BODY_DEFAULT_HELPER_TEXT = `Maximum ${PARAGRAPHS_MAX_LENGTH} characters.`;
const HIGHTLIGHTED_TEXT_DEFAULT_HELPER_TEXT = `Final sentence of body copy.`;

Expand Down Expand Up @@ -239,11 +238,7 @@ const VariantEditor: React.FC<EpicTestVariantEditorProps> = ({
return (
<RichTextEditorSingleLine
error={errors.heading !== undefined}
helperText={
errors.heading
? errors.heading.message || errors.heading.type
: HEADER_DEFAULT_HELPER_TEXT
}
helperText={errors.heading ? errors.heading.message || errors.heading.type : ''}
copyData={data.value}
updateCopy={value => {
data.onChange(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ const useStyles = makeStyles(({ palette, spacing }: Theme) => ({
},
}));

const HEADING_DEFAULT_HELPER_TEXT = 'Heading assitive text';
const SUBHEADING_DEFAULT_HELPER_TEXT = 'Subheading assitive text';

const HEADING_COPY_RECOMMENDED_LENGTH = 50;
const SUBHEADING_COPY_RECOMMENDED_LENGTH = 50;

Expand Down Expand Up @@ -133,7 +130,7 @@ const HeaderTestVariantContentEditor: React.FC<HeaderTestVariantContentEditorPro
<TextField
inputRef={register({ validate: templateValidator })}
error={errors.heading !== undefined}
helperText={errors.heading ? errors.heading.message : HEADING_DEFAULT_HELPER_TEXT}
helperText={errors.heading ? errors.heading.message : ''}
onBlur={handleSubmit(onSubmit)}
name="heading"
label="Heading"
Expand All @@ -154,9 +151,7 @@ const HeaderTestVariantContentEditor: React.FC<HeaderTestVariantContentEditorPro
<TextField
inputRef={register({ validate: templateValidator })}
error={errors.subheading !== undefined}
helperText={
errors.subheading ? errors.subheading.message : SUBHEADING_DEFAULT_HELPER_TEXT
}
helperText={errors.subheading ? errors.subheading.message : ''}
onBlur={handleSubmit(onSubmit)}
name="subheading"
label="Sub-heading"
Expand Down

0 comments on commit aad6541

Please sign in to comment.