File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
space/core/components/issues/navbar Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1+ import { List , Kanban , LucideProps } from "lucide-react" ;
2+ import { TIssueLayout } from "@plane/constants" ;
3+
4+ export const IssueLayoutIcon = ( { layout, ...props } : { layout : TIssueLayout } & LucideProps ) => {
5+ switch ( layout ) {
6+ case "list" :
7+ return < List { ...props } /> ;
8+ case "kanban" :
9+ return < Kanban { ...props } /> ;
10+ default :
11+ return null ;
12+ }
13+ } ;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { queryParamGenerator } from "@/helpers/query-param-generator";
1414import { useIssueFilter } from "@/hooks/store" ;
1515// mobx
1616import { TIssueLayout } from "@/types/issue" ;
17+ import { IssueLayoutIcon } from "./layout-icon" ;
1718
1819type Props = {
1920 anchor : string ;
@@ -57,8 +58,8 @@ export const IssuesLayoutSelection: FC<Props> = observer((props) => {
5758 } `}
5859 onClick = { ( ) => handleCurrentBoardView ( layout . key ) }
5960 >
60- < layout . icon
61- strokeWidth = { 2 }
61+ < IssueLayoutIcon
62+ layout = { layout . key }
6263 className = { `size-3.5 ${ activeLayout == layout . key ? "text-custom-text-100" : "text-custom-text-200" } ` }
6364 />
6465 </ button >
You can’t perform that action at this time.
0 commit comments