fix: issue icons in published project link (#6576)
This commit is contained in:
parent
a2328d0cbe
commit
1eb1e82fe4
2 changed files with 16 additions and 2 deletions
13
space/core/components/issues/navbar/layout-icon.tsx
Normal file
13
space/core/components/issues/navbar/layout-icon.tsx
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { List, Kanban, LucideProps } from "lucide-react";
|
||||
import { TIssueLayout } from "@plane/constants";
|
||||
|
||||
export const IssueLayoutIcon = ({ layout, ...props }: { layout: TIssueLayout } & LucideProps) => {
|
||||
switch (layout) {
|
||||
case "list":
|
||||
return <List {...props} />;
|
||||
case "kanban":
|
||||
return <Kanban {...props} />;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
|
@ -14,6 +14,7 @@ import { queryParamGenerator } from "@/helpers/query-param-generator";
|
|||
import { useIssueFilter } from "@/hooks/store";
|
||||
// mobx
|
||||
import { TIssueLayout } from "@/types/issue";
|
||||
import { IssueLayoutIcon } from "./layout-icon";
|
||||
|
||||
type Props = {
|
||||
anchor: string;
|
||||
|
|
@ -57,8 +58,8 @@ export const IssuesLayoutSelection: FC<Props> = observer((props) => {
|
|||
}`}
|
||||
onClick={() => handleCurrentBoardView(layout.key)}
|
||||
>
|
||||
<layout.icon
|
||||
strokeWidth={2}
|
||||
<IssueLayoutIcon
|
||||
layout={layout.key}
|
||||
className={`size-3.5 ${activeLayout == layout.key ? "text-custom-text-100" : "text-custom-text-200"}`}
|
||||
/>
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue