import * as React from "react"; import { GanttChartSquare, LayoutGrid, List } from "lucide-react"; import { TModuleLayoutOptions } from "@plane/types"; import { cn } from "@plane/utils"; interface ILayoutIcon { className?: string; containerClassName?: string; layoutType: TModuleLayoutOptions; size?: number; withContainer?: boolean; } export const ModuleLayoutIcon: React.FC = (props) => { const { layoutType, className = "", containerClassName = "", size = 14, withContainer = false } = props; // get Layout icon const icons = { list: List, board: LayoutGrid, gantt: GanttChartSquare, }; const Icon = icons[layoutType ?? "list"]; if (!Icon) return null; return ( <> {withContainer ? (
) : ( )} ); };