Style paste component

[MAILPOET-1808]
This commit is contained in:
Pavel Dohnal
2019-04-11 11:32:43 +02:00
committed by M. Shull
parent 0bdf42b183
commit a685f1632b
3 changed files with 50 additions and 22 deletions

View File

@@ -129,7 +129,7 @@ span {
margin: 20px 0px;
}
.import-selection-form {
.import_selection_form {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
@@ -138,4 +138,30 @@ span {
margin-right: 2.5em;
}
}
.import_heading {
color: #23282d;
font-size: 14px;
font-weight: 600;
line-height: 1.3;
}
.description {
color: #666;
font-size: 13px;
font-style: italic;
font-weight: 600;
margin: 2px 0 5px;
}
.import_paste_texts {
margin-right: 25px;
width: 300px;
}
.import_method_paste {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
}
}

View File

@@ -17,25 +17,27 @@ const MethodPaste = ({ setInputValid, setInputInvalid }) => {
};
return (
<div>
<label htmlFor="paste_input">
<span>{MailPoet.I18n.t('pasteLabel')}</span>
<p className="description">
{ReactStringReplace(
MailPoet.I18n.t('pasteDescription'),
/\[link\](.*?)\[\/link\]/,
match => (
<a
href={`${kbLink}`}
key="kb-link"
target="_blank"
rel="noopener noreferrer"
>
{ match }
</a>
)
)}
</p>
<>
<label htmlFor="paste_input" className="import_method_paste">
<div className="import_paste_texts">
<span className="import_heading">{MailPoet.I18n.t('pasteLabel')}</span>
<p className="description">
{ReactStringReplace(
MailPoet.I18n.t('pasteDescription'),
/\[link\](.*?)\[\/link\]/,
match => (
<a
href={`${kbLink}`}
key="kb-link"
target="_blank"
rel="noopener noreferrer"
>
{ match }
</a>
)
)}
</p>
</div>
<textarea
id="paste_input"
rows="15"
@@ -44,7 +46,7 @@ const MethodPaste = ({ setInputValid, setInputInvalid }) => {
onChange={onChange}
/>
</label>
</div>
</>
);
};

View File

@@ -9,7 +9,7 @@ function SelectImportMethod({
onMethodChange,
}) {
const renderSelection = () => (
<form className="import-selection-form">
<form className="import_selection_form">
<span>{MailPoet.I18n.t('methodSelectionHead')}</span>
<label htmlFor="import-paste-method">
<input