-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
π― Objective
Build the MarketStats component to display key Soroswap market data inside the dashboard.
π Component Structure
apps/webapp/components/dashboard/market-stats.tsx
π Requirements
Section Header
- Small chart-trend-up icon (muted gray).
- Heading:
Market Stats
infont-semibold
.
Stats List
- Total Volume (24h):
$1.2M
- Total Liquidity:
$8.4M
- Active Pairs:
12
- XLM Price:
$0.095
(in greentext-green-500
)
Layout:
- Label aligned left, value aligned right.
- Use monospace or tabular-nums for values to ensure clean alignment.
π¨ Design & Styling
- White card background, rounded-xl, soft shadow.
- Padding:
p-4
(mobile) /p-6
(desktop). - Label text:
text-gray-500 text-sm
. - Values:
text-gray-900 font-medium
. - Positive price change (XLM Price) in
text-green-500
.
βοΈ Functionality
- Accept props for
volume
,liquidity
,pairs
, andxlmPrice
to allow dynamic updates. - Optionally include a loading skeleton state for async data fetching.
π± Responsiveness
- Mobile: full width.
- Desktop: fixed width or flex item in a grid.
βΏ Accessibility
- Use
aria-label="Market statistics"
on container. - Ensure color contrast passes WCAG AA.
- Icon is decorative (
aria-hidden="true"
).
β Acceptance Criteria
- Matches the provided design visually.
- Displays all four stats with correct alignment and styling.
- Fully responsive and accessible.
- Supports dynamic values without breaking layout.