mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-18 02:30:51 +08:00
- Implemented a new hook `useVisualConfig` for managing visual configuration state and YAML parsing. - Added types for visual configuration in `visualConfig.ts`. - Enhanced `ConfigPage` to support switching between visual and source editors. - Introduced floating action buttons for save and reload actions. - Updated translations for tab labels in English and Chinese. - Styled the configuration page with new tab and floating action button styles.
23 lines
583 B
TypeScript
23 lines
583 B
TypeScript
import type { PropsWithChildren, ReactNode } from 'react';
|
|
import { Card } from '@/components/ui/Card';
|
|
|
|
interface ConfigSectionProps {
|
|
title: ReactNode;
|
|
description?: ReactNode;
|
|
className?: string;
|
|
}
|
|
|
|
export function ConfigSection({ title, description, className, children }: PropsWithChildren<ConfigSectionProps>) {
|
|
return (
|
|
<Card title={title} className={className}>
|
|
{description && (
|
|
<p style={{ margin: '-4px 0 16px 0', color: 'var(--text-secondary)', fontSize: 13 }}>
|
|
{description}
|
|
</p>
|
|
)}
|
|
{children}
|
|
</Card>
|
|
);
|
|
}
|
|
|