mirror of
https://github.com/katanemo/plano.git
synced 2026-06-20 15:28:07 +02:00
This change brings Turborepo monorepo to independently handle the marketing website, the docs website and any other future use cases for mutli-platform support. They are using internal @katanemo package handlers for the design system and logic.
34 lines
757 B
TypeScript
34 lines
757 B
TypeScript
import React from "react";
|
|
import { createFlowDiagram, FlowDiagramConfig } from "@/utils/asciiBuilder";
|
|
import { AsciiDiagram } from "./AsciiDiagram";
|
|
|
|
interface DiagramBuilderProps {
|
|
config: FlowDiagramConfig;
|
|
title?: string;
|
|
}
|
|
|
|
/**
|
|
* Simple Diagram Builder Component
|
|
*
|
|
* Usage:
|
|
*
|
|
* <DiagramBuilder
|
|
* config={{
|
|
* title: "My Process",
|
|
* width: 60,
|
|
* steps: [
|
|
* { label: "Start", type: "regular" },
|
|
* { label: "Process", type: "inner" },
|
|
* { label: "End", type: "regular" }
|
|
* ]
|
|
* }}
|
|
* />
|
|
*/
|
|
export const DiagramBuilder: React.FC<DiagramBuilderProps> = ({
|
|
config,
|
|
title,
|
|
}) => {
|
|
const asciiDiagram = createFlowDiagram(config);
|
|
|
|
return <AsciiDiagram content={asciiDiagram} title={title} />;
|
|
};
|