Skip to content

Commit

Permalink
[QUAR-642] add btn container styling
Browse files Browse the repository at this point in the history
  • Loading branch information
kirstybryce committed Jan 29, 2025
1 parent ece5251 commit 7f3ca09
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
9 changes: 6 additions & 3 deletions packages/bpk-component-card/src/BpkCardWrapper.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,22 @@
justify-content: space-between;
align-items: flex-end;

&--button {
&--button-container {
margin: tokens.bpk-spacing-md() tokens.bpk-spacing-base();
cursor: pointer;
}

&--button {
all: unset;

&:focus {
@include utils.bpk-focus-indicator;
}
}

&--toggleLabel {
&--toggle-label {
display: flex;
align-items: center;
cursor: pointer;

&--text {
margin-inline-end: tokens.bpk-spacing-md();
Expand Down
22 changes: 14 additions & 8 deletions packages/bpk-component-card/src/BpkCardWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ const BpkCardWrapper = ({
fill: body?.moreInfoBtnColor,
color: body?.moreInfoBtnColor,
}}
className={getClassName('bpk-card-wrapper--body--header--toggleLabel')}
className={getClassName('bpk-card-wrapper--body--header--toggle-label')}
>
<div
className={getClassName(
'bpk-card-wrapper--body--header--toggleLabel--text',
'bpk-card-wrapper--body--header--toggle-label--text',
)}
>
<BpkText textStyle={TEXT_STYLES.caption}>{toggleLabel}</BpkText>
Expand All @@ -87,13 +87,19 @@ const BpkCardWrapper = ({
<div className={getClassName('bpk-card-wrapper--body--header--content')}>
{header}
</div>
<button
type="button"
onClick={toggleExpand}
className={getClassName('bpk-card-wrapper--body--header--button')}
<div
className={getClassName(
'bpk-card-wrapper--body--header--button-container',
)}
>
{moreInfoToggle}
</button>
<button
type="button"
onClick={toggleExpand}
className={getClassName('bpk-card-wrapper--body--header--button')}
>
{moreInfoToggle}
</button>
</div>
<Portal
isOpen={isBodyOpen}
renderTarget={document.getElementById('body-header')}
Expand Down

0 comments on commit 7f3ca09

Please sign in to comment.