Skip to content

Commit

Permalink
[QUAR-642] adjust toggle btn margin
Browse files Browse the repository at this point in the history
  • Loading branch information
kirstybryce committed Jan 29, 2025
1 parent 61cff20 commit ece5251
Showing 1 changed file with 25 additions and 29 deletions.
54 changes: 25 additions & 29 deletions packages/bpk-component-card/src/BpkCardWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,35 +87,31 @@ const BpkCardWrapper = ({
<div className={getClassName('bpk-card-wrapper--body--header--content')}>
{header}
</div>
<div>
<button
type="button"
onClick={toggleExpand}
className={getClassName('bpk-card-wrapper--body--header--button')}
>
{moreInfoToggle}
</button>
<Portal
isOpen={isBodyOpen}
renderTarget={document.getElementById('body-header')}
>
<div className={getClassName('bpk-card-wrapper--body')}>
<BpkText textStyle={TEXT_STYLES.caption}>{body.text}</BpkText>
{body.link && body.linkText && (
<a
href={body.link}
className={getClassName('bpk-card-wrapper--body--link-text')}
target="_blank"
rel="noopener noreferrer"
>
<BpkText textStyle={TEXT_STYLES.caption}>
{body.linkText}
</BpkText>
</a>
)}
</div>
</Portal>
</div>
<button
type="button"
onClick={toggleExpand}
className={getClassName('bpk-card-wrapper--body--header--button')}
>
{moreInfoToggle}
</button>
<Portal
isOpen={isBodyOpen}
renderTarget={document.getElementById('body-header')}
>
<div className={getClassName('bpk-card-wrapper--body')}>
<BpkText textStyle={TEXT_STYLES.caption}>{body.text}</BpkText>
{body.link && body.linkText && (
<a
href={body.link}
className={getClassName('bpk-card-wrapper--body--link-text')}
target="_blank"
rel="noopener noreferrer"
>
<BpkText textStyle={TEXT_STYLES.caption}>{body.linkText}</BpkText>
</a>
)}
</div>
</Portal>
</div>
);

Expand Down

0 comments on commit ece5251

Please sign in to comment.