Skip to content

Commit

Permalink
fix: negative progress style
Browse files Browse the repository at this point in the history
  • Loading branch information
JorgePeniaranda committed Feb 20, 2024
1 parent c50e62c commit 1619e13
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/molecules/cards/stats-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function InfoCard ({ title, value, progress, classname, icon, ico
<article>
<h2>{title}</h2>
<b>{value}</b>
<p className={style.indicator}><span className={spanClasses}>{progress}</span> desde ayer</p>
<p className={style.indicator}><span className={spanClasses}>{Math.abs(progress)}</span> desde ayer</p>
</article>
{
icon !== undefined && (
Expand Down
3 changes: 3 additions & 0 deletions src/components/molecules/cards/stats-card/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
}
&.negative{
color: oklch(63.06% 0.226 21.66);
&::before{
content: '-';
}
}
&::after{
content: '%';
Expand Down
2 changes: 1 addition & 1 deletion src/components/templates/dashboard/money/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function MoneyTemplate ({ currentMoney, earnedMoney, spentMoney,
<div className='flex flex-wrap gap-7'>
<InfoCard title='Tu dinero' value={`${Currency}$${currentMoney}`} progress={10} classname='flex-1' icon={cardsIcons.Money.icon} iconBGColor={cardsIcons.Money.color}/>
<InfoCard title='Tus ganancias' value={`${Currency}$${earnedMoney}`} progress={10} classname='flex-1' icon={cardsIcons.Graph.icon} iconBGColor={cardsIcons.Graph.color}/>
<InfoCard title='Dinero gastado' value={`${Currency}$${spentMoney}`} progress={10} classname='flex-1' icon={cardsIcons.Expenses.icon} iconBGColor={cardsIcons.Expenses.color}/>
<InfoCard title='Dinero gastado' value={`${Currency}$${spentMoney}`} progress={-10} classname='flex-1' icon={cardsIcons.Expenses.icon} iconBGColor={cardsIcons.Expenses.color}/>
</div>
<section className='flex gap-7 mt-7'>
<article className='flex-[2] bg-white rounded-2xl shadow-[0_0_2rem_0_rgba(136,152,170,.15)] p-5 gap-10'>
Expand Down

0 comments on commit 1619e13

Please sign in to comment.