Untitled
unknown
plain_text
a year ago
3.6 kB
7
Indexable
in below code after featured story textare there is a lot of blank space coming as it disappears when we search any insight and use that the that space is covered by text areas like custom article title url date then that space disappears else that white blank space is coming
<PanelBody title={__('Block Settings', 'blackstone')} initialOpen>
{!(postOne && postOne.id) && (
<div className="components-base-control__field">
<label className="components-base-control__label" style={labelStyles}>
{__('Featured Story', 'blackstone')}
</label>
</div>
)}
<PanelRow>
<ContentPicker
onPickChange={handlePickChangeOne}
mode="post"
label={postOne ? '' : __('Search News or Insights', 'blackstone')}
content={postOne && Object.keys(postOne).length > 0 ? [postOne] : []}
contentTypes={['news', 'insight']}
queryFilter={queryFilter}
/>
</PanelRow>
{!(postOne && postOne.id) && (
<div className="components-base-control__field">
<label className="components-base-control__label" style={helpStyles}>
{__(
'Please enter a search phrase above to find the featured story.',
'blackstone',
)}
</label>
</div>
)}
<PanelRow>
{postOne && postOne.id && (
<TextareaControl
label={__('Custom Article Title', 'blackstone')}
help="Optional text that will override the title of this selected article."
value={customTitleOne}
onChange={(customTitleOne) => {
setAttributes({ customTitleOne });
}}
/>
)}
</PanelRow>
<PanelRow>
{postOne && postOne.id && (
<TextareaControl
label={__('Custom Article Category Name', 'blackstone')}
help="Optional text that will override the category of this selected article."
value={customCategoryOne || ''}
onChange={(newCategory) => {
if (newCategory) {
setAttributes({
customCategoryOne: newCategory
});
} else {
setAttributes({
customCategoryOne: '',
});
}
}}
/>
)}
</PanelRow>
<PanelRow>
{postOne && postOne.id && (
<TextControl
label={__('Custom Article Category URL Override', 'blackstone')}
help="Optional date that will override the existing date of this selected article."
value={customCategoryUrlOne}
onChange={(customCategoryUrlOne) => {
setAttributes({ customCategoryUrlOne });
}}
/>
)}
</PanelRow>
<PanelRow>
{postOne && postOne.id && (
<TextControl
label={__('Custom Date', 'blackstone')}
help="Optional date that will override the existing date of this selected article."
value={customDateOne}
onChange={(customDateOne) => {
setAttributes({ customDateOne });
}}
/>
)}
</PanelRow>
<PanelRow>
{postOne && postOne.id && (
<TextControl
label={__('Custom Article Url', 'blackstone')}
help="Optional url that will override the title url of this selected article."
value={customUrlOne || ''}
onChange={(newUrl) => {
setAttributes({
customUrlOne: newUrl,
linkOne: newUrl ? newUrl : postResponseDataOne.link
});
}}
/>
)}
</PanelRow>
<PanelBody title={__('Image Rendition Settings', 'blackstone')}>
<PanelRow>
<RichText
enforce={false}
className="components-text-control__input bx-vertical-list__input"
placeholder={__('Rendition Name', 'blackstone')}
multiline={false}
onChange={(renditionName) => setAttributes({ renditionName })}
value={renditionName}
/>
</PanelRow>
</PanelBody>
</PanelBody>Editor is loading...
Leave a Comment