mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
5b0066140f
* chore: format all files in the project * fix: removing @types/react from dependencies * fix: adding prettier and eslint config * chore: format files * fix: upgrading turbo version * chore: ignoring warnings and adding todos * fix: updated the type of bubble menu item in the document editor * chore: format files --------- Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
// mobx react lite
|
|
import { observer } from "mobx-react-lite";
|
|
// interfaces
|
|
import { IIssueState } from "types/issue";
|
|
// constants
|
|
import { issueGroupFilter } from "constants/data";
|
|
// ui
|
|
import { StateGroupIcon } from "@plane/ui";
|
|
// mobx hook
|
|
import { useMobxStore } from "lib/mobx/store-provider";
|
|
import { RootStore } from "store/root";
|
|
|
|
export const IssueKanBanHeader = observer(({ state }: { state: IIssueState }) => {
|
|
const store: RootStore = useMobxStore();
|
|
|
|
const stateGroup = issueGroupFilter(state.group);
|
|
|
|
if (stateGroup === null) return <></>;
|
|
|
|
return (
|
|
<div className="flex items-center gap-2 px-2 pb-2">
|
|
<div className="flex h-3.5 w-3.5 flex-shrink-0 items-center justify-center">
|
|
<StateGroupIcon stateGroup={state.group} color={state.color} height="14" width="14" />
|
|
</div>
|
|
<div className="mr-1 truncate font-semibold capitalize text-custom-text-200">{state?.name}</div>
|
|
<span className="flex-shrink-0 rounded-full text-custom-text-300">
|
|
{store.issue.getCountOfIssuesByState(state.id)}
|
|
</span>
|
|
</div>
|
|
);
|
|
});
|