plane/web/components/pages/list/block.tsx
Anmol Singh Bhatia 87a606446f
[WEB-1093] chore: padding and borders consistency (#4315)
* chore: global list layout and list item component added

* chore: project view list layout consistency

* chore: project view sub header consistency

* chore: pages list layout consistency

* chore: project view sub header improvement

* chore: list layout item component improvement

* chore: module list layout consistency

* chore: cycle list layout consistency

* chore: issue list layout consistency

* chore: header height consistency

* chore: sub header consistency

* chore: list layout improvement

* chore: inbox sidebar improvement

* fix: cycle quick action

* chore: inbox selected issue improvement

* chore: label option removed from pages filter

* chore: inbox create issue modal improvement
2024-04-30 17:21:24 +05:30

31 lines
883 B
TypeScript

import { FC } from "react";
import { observer } from "mobx-react";
// components
import { ListItem } from "@/components/core/list";
import { BlockItemAction } from "@/components/pages/list";
// hooks
import { usePage } from "@/hooks/store";
import { usePlatformOS } from "@/hooks/use-platform-os";
type TPageListBlock = {
workspaceSlug: string;
projectId: string;
pageId: string;
};
export const PageListBlock: FC<TPageListBlock> = observer((props) => {
const { workspaceSlug, projectId, pageId } = props;
// hooks
const { name } = usePage(pageId);
const { isMobile } = usePlatformOS();
return (
<ListItem
title={name ?? ""}
itemLink={`/${workspaceSlug}/projects/${projectId}/pages/${pageId}`}
actionableItems={<BlockItemAction workspaceSlug={workspaceSlug} projectId={projectId} pageId={pageId} />}
isMobile={isMobile}
/>
);
});