/** * Copyright (c) 2023-present Plane Software, Inc. and contributors * SPDX-License-Identifier: AGPL-3.0-only * See the LICENSE file for details. */ import * as React from "react"; import { GridOutline, ListOutline, TimelineOutline } from "@makeplane/propel/icons"; import type { TModuleLayoutOptions } from "@plane/types"; import { cn } from "@plane/utils"; interface ILayoutIcon { className?: string; containerClassName?: string; layoutType: TModuleLayoutOptions; size?: number; withContainer?: boolean; } export function ModuleLayoutIcon(props: ILayoutIcon) { const { layoutType, className = "", containerClassName = "", size = 14, withContainer = false } = props; // get Layout icon const icons = { list: ListOutline, board: GridOutline, gantt: TimelineOutline, }; const Icon = icons[layoutType ?? "list"]; if (!Icon) return null; return ( <> {withContainer ? (
) : ( )} ); }