π Broker Forms
Form and input components for broker creation and editing.
π BrokerForm
The create/edit form for a broker. Used inside BrokerModal.
π Fields
| Field | Component | Required | Description |
|---|---|---|---|
| Name | Text input | β | Broker display name |
| Description | Textarea | β | Optional description |
| Base Currency | CurrencySearchSelect | β | Default currency for cash tracking |
| Portal URL | Text input | β | Broker website (used for favicon fallback) |
| Icon | ImagePickerWrapper | β | Custom broker icon |
| Default Plugin | ImportPluginSelect | β | Default BRIM parser for this broker |
| Allow Overdraft | Toggle | β | Allow negative cash balance |
β Validation
- Name: Required, minimum 1 character
- Currency: Required, must be a valid ISO 4217 code
πΌοΈ BrokerIcon
A smart icon component with a 4-step fallback chain:
graph LR
A["icon_url<br/><small>Custom uploaded</small>"] -->|not set| B["portal_url favicon<br/><small>Google Favicon API</small>"]
B -->|not found| C["Plugin icon<br/><small>From BRIM plugin API</small>"]
C -->|not found| D["Briefcase βοΈ<br/><small>Default Lucide icon</small>"]
style A fill:#e8f5e9,stroke:#2e7d32
style B fill:#e3f2fd,stroke:#1565c0
style C fill:#fff3e0,stroke:#e65100
style D fill:#f3e5f5,stroke:#7b1fa2
π Sizes
| Size | Dimensions | Used in |
|---|---|---|
sm |
24Γ24 px | Inline references, select options |
md |
32Γ32 px | BrokerCard, list items |
lg |
48Γ48 px | Broker detail page header |
π Key Props
| Prop | Type | Description |
|---|---|---|
iconUrl |
string \| null |
Custom icon URL (step 1) |
portalUrl |
string \| null |
Broker website for favicon (step 2) |
pluginCode |
string \| null |
BRIM plugin code for icon (step 3) |
size |
'sm' \| 'md' \| 'lg' |
Icon size |
altText |
string |
Accessible alt text |
Used by: BrokerCard, BrokerSearchSelect, broker detail page.