Files
nofx/web/src/components/common/Container.tsx
tinkle-community 110bf52908 feat: cream terminal redesign, English-only UI, autopilot launch fixes
- Redesign dashboard into a cream-paper + vermilion IBM Plex Mono terminal
  (live L2 order book, cost/liq map, WS K-line, signal matrix, orchestration
  topology, risk radar, execution log, current positions, equity curve)
- Convert all user-facing UI and backend strings/prompts from Chinese to
  English (multi-language retained, default English)
- Add /api/statistics/full endpoint + full-stats frontend wiring
- Fix Autopilot launch: reuse the existing trader instead of creating
  duplicates (eliminates repeat ~35s create cost and stale-trader 404s);
  launch sends 5m scan interval
- Fix unreadable toasts: cream theme with high-contrast text + per-type accent
- Silence background dashboard polls (getTraderConfig) to stop error-toast spam
2026-06-30 16:03:52 +08:00

41 lines
1.0 KiB
TypeScript

import { ReactNode, CSSProperties } from 'react'
interface ContainerProps {
children: ReactNode
className?: string
as?: 'div' | 'main' | 'header' | 'section'
style?: CSSProperties
/** Whether to fill the full width (removes max-width) */
fluid?: boolean
/** Whether to remove horizontal padding */
noPadding?: boolean
/** Custom max-width class (default max-w-[1920px]) */
maxWidthClass?: string
}
/**
* Unified container component that ensures all page elements use a consistent max width and padding
* - max-width: 1920px
* - padding: 24px (mobile) -> 32px (tablet) -> 48px (desktop)
*/
export function Container({
children,
className = '',
as: Component = 'div',
style,
fluid = false,
noPadding = false,
maxWidthClass = 'max-w-[1920px]',
}: ContainerProps) {
const maxWidth = fluid ? 'w-full' : maxWidthClass
const padding = noPadding ? 'px-0' : 'px-6 sm:px-8 lg:px-12'
return (
<Component
className={`${maxWidth} mx-auto ${padding} ${className}`}
style={style}
>
{children}
</Component>
)
}