Skip to content

Commit

Permalink
PLANET-7512 Update Take Action Boxout styles (#2365)
Browse files Browse the repository at this point in the history
This is to follow the design system
  • Loading branch information
mleray authored Sep 5, 2024
1 parent 0f8deae commit c2bf18c
Show file tree
Hide file tree
Showing 6 changed files with 169 additions and 160 deletions.
20 changes: 10 additions & 10 deletions assets/src/blocks/TakeActionBoxout/TakeActionBoxoutEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,17 @@ export const TakeActionBoxoutEditor = ({
withoutInteractiveFormatting
allowedFormats={['core/bold', 'core/italic']}
/>
<RichText
tagName="div"
className="btn btn-primary"
placeholder={__('Button text', 'planet4-blocks-backend')}
value={linkText}
onChange={toAttribute('linkText')}
disabled={takeActionPageSelected}
withoutInteractiveFormatting
allowedFormats={[]}
/>
</div>
<RichText
tagName="div"
className="btn btn-action cover-card-btn"
placeholder={__('Button text', 'planet4-blocks-backend')}
value={linkText}
onChange={toAttribute('linkText')}
disabled={takeActionPageSelected}
withoutInteractiveFormatting
allowedFormats={[]}
/>
</section>
);

Expand Down
26 changes: 13 additions & 13 deletions assets/src/blocks/TakeActionBoxout/TakeActionBoxoutFrontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const TakeActionBoxoutFrontend = ({
href={link}
{...newTab && {rel: 'noreferrer', target: '_blank'}}
/>
<img src={imageUrl} alt={imageAlt} />
{imageUrl ? <img src={imageUrl} alt={imageAlt} /> : <div className="boxout-placeholder" />}
<div className="boxout-content">
{title &&
<a
Expand All @@ -38,18 +38,18 @@ export const TakeActionBoxoutFrontend = ({
{excerpt &&
<p className="boxout-excerpt" dangerouslySetInnerHTML={{__html: excerpt}} />
}
{link && linkText &&
<a
className="btn btn-primary"
data-ga-category="Take Action Boxout"
data-ga-action="Call to Action"
data-ga-label="n/a"
href={link}
{...newTab && {rel: 'noreferrer', target: '_blank'}}
>
{linkText}
</a>
}
</div>
{link && linkText &&
<a
className="btn btn-primary"
data-ga-category="Take Action Boxout"
data-ga-action="Call to Action"
data-ga-label="n/a"
href={link}
{...newTab && {rel: 'noreferrer', target: '_blank'}}
>
{linkText}
</a>
}
</section>
);
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
.boxout-image-container {
position: relative;
background: var(--grey-500);
height: 100%;
width: 336px;
width: 50%;
padding: 0;
display: flex;
align-items: center;
Expand Down
Loading

0 comments on commit c2bf18c

Please sign in to comment.