This commit is contained in:
Magdalena Markusik 2020-09-21 16:30:18 +02:00
parent d8a770b5b3
commit e69c7057bd

View file

@ -104,12 +104,21 @@ const SeoForm: React.FC<SeoFormProps> = props => {
})} })}
toolbar={ toolbar={
<Button color="primary" variant="text" onClick={toggleExpansion}> <Button color="primary" variant="text" onClick={toggleExpansion}>
<FormattedMessage defaultMessage="Edit website SEO" description="button" /> <FormattedMessage
defaultMessage="Edit website SEO"
description="button"
/>
</Button> </Button>
} }
/> />
<CardContent> <CardContent>
{shouldDisplayHelperText() && <Typography className={classNames({ [classes.helperText]: expanded })}>{helperText}</Typography>} {shouldDisplayHelperText() && (
<Typography
className={classNames({ [classes.helperText]: expanded })}
>
{helperText}
</Typography>
)}
{expanded && ( {expanded && (
<div className={classes.container}> <div className={classes.container}>
<TextField <TextField
@ -134,7 +143,8 @@ const SeoForm: React.FC<SeoFormProps> = props => {
</div> </div>
} }
helperText={intl.formatMessage({ helperText={intl.formatMessage({
defaultMessage: "If empty, the preview shows what will be autogenerated." defaultMessage:
"If empty, the preview shows what will be autogenerated."
})} })}
value={slug?.slice(0, 69)} value={slug?.slice(0, 69)}
disabled={loading || disabled} disabled={loading || disabled}
@ -165,7 +175,8 @@ const SeoForm: React.FC<SeoFormProps> = props => {
</div> </div>
} }
helperText={intl.formatMessage({ helperText={intl.formatMessage({
defaultMessage: "If empty, the preview shows what will be autogenerated." defaultMessage:
"If empty, the preview shows what will be autogenerated."
})} })}
value={title?.slice(0, 69)} value={title?.slice(0, 69)}
disabled={loading || disabled} disabled={loading || disabled}
@ -196,7 +207,8 @@ const SeoForm: React.FC<SeoFormProps> = props => {
</div> </div>
} }
helperText={intl.formatMessage({ helperText={intl.formatMessage({
defaultMessage: "If empty, the preview shows what will be autogenerated." defaultMessage:
"If empty, the preview shows what will be autogenerated."
})} })}
value={description?.slice(0, 299)} value={description?.slice(0, 299)}
onChange={onChange} onChange={onChange}