// trade.jsx — Trade flow re-imagined as a bottom-sheet modal // Shows 3 stages of the modal side-by-side (composite slide), like a wizard // but visualized as a single sheet that morphs. function TradeFlow({ dark }) { const t = useTheme(dark); // We render the "stock page underneath" once and then show three sheet states // as a composite — here just the most informative one. return (
{/* Backdrop: subtle stock detail */}
{Icon.back(t.text, 22)}
Amazon.com
AMZN
€227.35
{/* Dimmer */}
{/* Bottom sheet */}
{/* drag handle */}
{/* Header: ticker + step indicator */}
Trade Amazon.com
AMZN · €227.35 · −1.50%
×
{/* Step dots */}
{['Side', 'Amount', 'Limits', 'Confirm'].map((s, i) => (
{i + 1}. {s}
))}
{/* Step 3 active: Limits */}
{/* Side recap */}
{Icon.check('#fff', 14)}
Buying
10 shares
€2,273.50
{/* Order type */}
ORDER TYPE
{[ { id: 'market', label: 'Market', sub: 'Now @ €227.35' }, { id: 'limit', label: 'Limit', sub: 'Set price', active: true }, { id: 'stop', label: 'Stop', sub: 'Trigger' }, ].map(o => (
{o.label}
{o.sub}
))}
{/* Limit price input */}
LIMIT PRICE Day H €228.50 · L €224.45
€ 225.00 −1.0% vs spot
{/* Quick % buttons */}
{['−5%','−2%','−1%','Spot','+1%','+2%'].map((p, i) => (
{p}
))}
{/* Valid till */}
VALID TILL
21 May 2026
STOP LOSS
+ Add
{/* Crowd inline */}
{Icon.users('#fff', 16)}
97% of crowd agrees with Buy
Median target €253.48 · +11.3% upside
{/* CTAs */}
← Back
Review order €2,250.00
{/* Home indicator zone */}
); } Object.assign(window, { TradeFlow });