Skip to content

Commit

Permalink
refactor: update level button styles and elements based on descriptio…
Browse files Browse the repository at this point in the history
…nsEnabled
  • Loading branch information
JoshuaHungDinh committed Apr 16, 2024
1 parent ff9b986 commit 9b7d216
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,19 @@ const DonationLevels = ({

return (
<LevelButton selected={level === defaultLevel} key={index} descriptionsEnabled={descriptionsEnabled}>
<span className={'give-donation-block__level__amount'}>{levelAmount}</span>
<span className={'give-donation-block__level__label'}>
{descriptionsEnabled && descriptions[index] !== ''
? descriptions[index]
: __('Description goes here', 'give')}
<span
className={cx({
'give-donation-block__level__amount': descriptionsEnabled,
})}
>
{levelAmount}
</span>

{descriptionsEnabled && (
<span className={'give-donation-block__level__label'}>
{descriptions[index] !== '' ? descriptions[index] : __('Description goes here', 'give')}
</span>
)}
</LevelButton>
);
})}
Expand Down

0 comments on commit 9b7d216

Please sign in to comment.