import { CompanyProfile } from '@hanzo/ui'
TradingView's company profile for one symbol, dark, 400px tall and as wide as its parent.
export function Default() {return <CompanyProfile symbol="NASDAQ:AAPL" />}
`colorTheme="light"` takes the widget's light palette and `isTransparent` drops its background so the app's own shows through.
export function LightAndTransparent() {return (<CompanyProfile symbol="NASDAQ:MSFT" colorTheme="light" isTransparent height={320} rounded="$3" />)}
Each profile is its own frame, so a column of them stacks like any other boxes.
export function SeveralSymbols() {return (<YStack gap="$4"><CompanyProfile symbol="NASDAQ:AAPL" height={320} /><CompanyProfile symbol="NASDAQ:GOOGL" height={320} /></YStack>)}
`symbol` comes from state; a change opens the profile afresh at the new address.
export function Controlled() {const symbols = ["NASDAQ:AAPL", "NASDAQ:MSFT", "BINANCE:ETHUSDT"]const [symbol, setSymbol] = useState(symbols[0])return (<YStack gap="$3"><XStack gap="$2" flexWrap="wrap">{symbols.map((s) => (<Button key={s} size="sm" variant={s === symbol ? "primary" : "outline"} onPress={() => setSymbol(s)} >{s}</Button>))}</XStack><CompanyProfile symbol={symbol} height={420} /></YStack>)}
export type CompanyProfileTheme = 'light' | 'dark'
export interface CompanyProfileProps extends Omit<YStackProps, 'width' | 'height' | 'colorTheme'> {/** The symbol to describe, exchange-qualified. */symbol?: stringwidth?: string | numberheight?: string | numberlocale?: string/** The widget's own palette; independent of the surrounding gui theme. */colorTheme?: CompanyProfileThemeisTransparent?: boolean}