suitedaces / sales-dashboard

https://demo-sales-dashboard.vercel.app
MIT License
0 stars 0 forks source link

Feature: color of the % number in the dashboard should be based on +/- #17

Open suitedaces opened 6 months ago

suitedaces commented 6 months ago

In our dashboard, under revenue, subscription, sales, etc: where you see <+number%> last month, i want the number to be green if it's a positive % change, and red if it's a negative percentage change

suitedaces commented 6 months ago

@devapeai /code make sure the positive numbers are green and number percentages are red

dev-ape-ai[bot] commented 6 months ago

🔍 Starting the search for relevant code...

Relevant Code

Searched for keywords related to dashboard, revenue, subscription, sales, percentage change, and color.

View Snippets ```tsx // app/(dashboard)/dashboard/page.tsx Sales ...
+12,234

+19% from last month

Subscriptions ...
$45,231.89

+20.1% from last month

Recent Sales ... ```

Plan of Action

To address the issue, we'll modify the text color based on the percentage change. This involves:

  1. Identifying the elements displaying percentage changes.
  2. Applying conditional styling to change the text color to green for positive percentages and red for negative percentages.
File Changes
app/(dashboard)/dashboard/page.tsx Modify the Card components to include conditional styling for percentage change text.
dev-ape-ai[bot] commented 6 months ago

🚀 Pull Request created successfully! Check it out here: PR link.

👀 Review and merge when ready. Feel free to reach out if there are any issues or further modifications needed. Happy coding! 🎉