Files
zeekay e0ec477433 feat: full docs modernization — zero 404s, 585 pages, dep updates
- Enable all 15 finance component docs (from .disabled → .mdx)
- Create stock-market.mdx, 8 chart docs, 8 block docs, 2 framework docs
- Add direction.tsx component (RTL/LTR support from upstream shadcn)
- Add xs/icon-xs button sizes, data-variant/data-size attributes
- Fix build-registry.mts to handle default exports in namespace re-exports
- Add default props to order-entry, positions-list, orders-history, trading-panel
- Fix 18 navigation stubs → re-export from root implementations
- Add 44 orphaned MDX files to nav (installation, dark-mode, desktop, guides, etc)
- Migrate 6 framer-motion imports → motion/react
- Bump React 19.2.0→19.2.4, Next.js 16.0.1→16.1.6, motion→12.34.0
- Align lucide-react, sonner v2, tailwind-merge v3, postcss-selector-parser v7
- Remove framer-motion dep (superseded by motion)
- Fix @types/react-dom, TypeScript versions across workspaces
2026-03-03 07:34:51 -08:00

81 lines
1.5 KiB
Plaintext

---
title: Positions List
description: Display current trading positions with P&L tracking.
component: true
---
<ComponentPreview
name="positions-list"
description="Active positions display"
/>
## Installation
<Tabs defaultValue="cli">
<TabsList>
<TabsTrigger value="cli">CLI</TabsTrigger>
<TabsTrigger value="manual">Manual</TabsTrigger>
</TabsList>
<TabsContent value="cli">
```bash
npx @hanzo/ui@latest add positions-list
```
</TabsContent>
<TabsContent value="manual">
<Steps>
<Step>Install the following dependencies:</Step>
```bash
npm install @hanzo/ui
```
<Step>Copy and paste the following code into your project.</Step>
<ComponentSource name="positions-list" />
<Step>Update the import paths to match your project setup.</Step>
</Steps>
</TabsContent>
</Tabs>
## Usage
```tsx
import { PositionsList } from "@hanzo/ui/finance"
export default function Demo() {
const positions = [
{
id: "1",
symbol: "AAPL",
side: "buy",
shares: 100,
entryPrice: 150.0,
currentPrice: 175.5,
pnl: 2550,
pnlPercent: 17.0,
},
]
return <PositionsList positions={positions} />
}
```
## Props
| Prop | Type | Default | Description |
| --------- | ---------- | ------- | ----------------------------- |
| positions | Position[] | [] | Array of position objects |
| onClose | function | - | Callback when position closed |
| showPnL | boolean | true | Show profit/loss column |