mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
Replace monolithic Connection.tsx (1076 lines) with modular architecture: - 4 block renderers (cards, timeline, accordion, minimal) selectable via uiConfig.installationGuidesBlockType from RemnaWave config - Color parser utility with 14 named colors + hex support - InstallationGuide component handles platform/app selection and button rendering (subscriptionLink, copyButton, external) - Remove classic step-based format (AppButton, AppStep, AppInfo) - Add appConfig query invalidation on admin UUID change
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import { getColorGradient } from '@/utils/colorParser';
|
|
import { ThemeIcon } from './ThemeIcon';
|
|
import type { BlockRendererProps } from './types';
|
|
|
|
export function MinimalBlock({
|
|
blocks,
|
|
isMobile,
|
|
getLocalizedText,
|
|
getSvgHtml,
|
|
renderBlockButtons,
|
|
}: BlockRendererProps) {
|
|
return (
|
|
<div className="space-y-0">
|
|
{blocks.map((block, index) => {
|
|
const gradientStyle = getColorGradient(block.svgIconColor || 'cyan');
|
|
const isLast = index === blocks.length - 1;
|
|
|
|
return (
|
|
<div key={index} className={isLast ? '' : 'mb-4 border-b border-dark-700/50 pb-4'}>
|
|
<div className="mb-2 flex items-center gap-3">
|
|
<ThemeIcon
|
|
getSvgHtml={getSvgHtml}
|
|
svgIconKey={block.svgIconKey}
|
|
gradientStyle={gradientStyle}
|
|
isMobile={isMobile}
|
|
/>
|
|
<span className="font-medium text-dark-100">{getLocalizedText(block.title)}</span>
|
|
</div>
|
|
<p className="whitespace-pre-line text-sm leading-relaxed text-dark-400">
|
|
{getLocalizedText(block.description)}
|
|
</p>
|
|
{renderBlockButtons(block.buttons, 'subtle')}
|
|
</div>
|
|
);
|
|
})}
|
|
</div>
|
|
);
|
|
}
|