chore: update docs
This commit is contained in:
@@ -1,32 +1,7 @@
|
||||
# frontend/src/shared/
|
||||
|
||||
Shared components that are reusable across multiple features.
|
||||
|
||||
## Subdirectories
|
||||
|
||||
| Directory | What | When to read |
|
||||
| --------- | ---- | ------------ |
|
||||
| `components/CameraCapture/` | Camera capture with crop tool | Building OCR features, image upload |
|
||||
|
||||
## Components
|
||||
|
||||
### CameraCapture
|
||||
|
||||
Full-featured camera capture component with:
|
||||
- `getUserMedia` API for camera access
|
||||
- Translucent guidance overlays (VIN, receipt, document)
|
||||
- Post-capture crop tool
|
||||
- File input fallback for desktop/unsupported browsers
|
||||
- HEIC, JPEG, PNG support
|
||||
|
||||
Usage:
|
||||
```tsx
|
||||
import { CameraCapture } from '@/shared/components/CameraCapture';
|
||||
|
||||
<CameraCapture
|
||||
onCapture={(file, croppedFile) => handleCapture(file, croppedFile)}
|
||||
onCancel={() => setShowCamera(false)}
|
||||
guidanceType="vin"
|
||||
allowCrop={true}
|
||||
/>
|
||||
```
|
||||
| `components/` | Shared components (CameraCapture) | Cross-feature reusable components |
|
||||
|
||||
Reference in New Issue
Block a user