[WEB-4660] chore: replace jsx element with react node (#7567)

* chore: replace jsx element with react node

* fix: review comments

* fix: tooltip types update

* fix: propel pacakge fix
This commit is contained in:
sriram veeraghanta 2025-08-11 18:42:23 +05:30 committed by GitHub
parent 1ef30746a2
commit a085c0ec62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 102 additions and 57 deletions

View file

@ -10,7 +10,7 @@ type Props = {
placeholder?: string;
hiddenOptions?: ChartXAxisProperty[];
allowNoValue?: boolean;
label?: string | JSX.Element;
label?: string | React.ReactNode;
};
export const SelectXAxis: React.FC<Props> = (props) => {

View file

@ -12,9 +12,9 @@ interface IListItemProps {
title: string;
itemLink: string;
onItemClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
prependTitleElement?: JSX.Element;
appendTitleElement?: JSX.Element;
actionableItems?: JSX.Element;
prependTitleElement?: React.ReactNode;
appendTitleElement?: React.ReactNode;
actionableItems?: React.ReactNode;
isMobile?: boolean;
parentRef: React.RefObject<HTMLDivElement>;
disableLink?: boolean;
@ -22,7 +22,7 @@ interface IListItemProps {
itemClassName?: string;
actionItemContainerClassName?: string;
isSidebarOpen?: boolean;
quickActionElement?: JSX.Element;
quickActionElement?: React.ReactNode;
preventDefaultProgress?: boolean;
leftElementClassName?: string;
rightElementClassName?: string;

View file

@ -22,7 +22,7 @@ type Props = {
onError?: (error: any) => void;
placement?: Placement;
prompt?: string;
button: JSX.Element;
button: React.ReactNode;
className?: string;
workspaceId: string;
workspaceSlug: string;

View file

@ -23,7 +23,7 @@ type DropdownOptions =
| {
value: string | null;
query: string;
content: JSX.Element;
content: React.ReactNode;
}[]
| undefined;

View file

@ -33,7 +33,7 @@ type DropdownOptions =
| {
value: string | null;
query: string;
content: JSX.Element;
content: React.ReactNode;
}[]
| undefined;

View file

@ -18,7 +18,7 @@ type DropdownOptions =
| {
value: string | null;
query: string;
content: JSX.Element;
content: React.ReactNode;
}[]
| undefined;

View file

@ -46,7 +46,7 @@ type Props = {
currentView: TGanttViews,
targetDate?: Date
) => ChartDataType | undefined;
quickAdd?: React.JSX.Element | undefined;
quickAdd?: React.ReactNode | undefined;
isEpic?: boolean;
};

View file

@ -43,7 +43,7 @@ type ChartViewRootProps = {
loadMoreBlocks?: () => void;
updateBlockDates?: (updates: IBlockUpdateDependencyData[]) => Promise<void>;
canLoadMoreBlocks?: boolean;
quickAdd?: React.JSX.Element | undefined;
quickAdd?: React.ReactNode | undefined;
showToday: boolean;
isEpic?: boolean;
};

View file

@ -14,7 +14,7 @@ type GanttChartRootProps = {
blockUpdateHandler: (block: any, payload: IBlockUpdateData) => void;
blockToRender: (data: any) => React.ReactNode;
sidebarToRender: (props: any) => React.ReactNode;
quickAdd?: React.JSX.Element | undefined;
quickAdd?: React.ReactNode | undefined;
canLoadMoreBlocks?: boolean;
loadMoreBlocks?: () => void;
updateBlockDates?: (updates: IBlockUpdateDependencyData[]) => Promise<void>;

View file

@ -13,7 +13,7 @@ type Props = {
id: string;
isLastChild: boolean;
isDragEnabled: boolean;
children: (isDragging: boolean) => JSX.Element;
children: (isDragging: boolean) => React.ReactNode;
onDrop: (draggingBlockId: string | undefined, droppedBlockId: string | undefined, dropAtEndOfList: boolean) => void;
};

View file

@ -22,7 +22,7 @@ type Props = {
enableSelection: boolean | ((blockId: string) => boolean);
sidebarToRender: (props: any) => React.ReactNode;
title: string;
quickAdd?: React.JSX.Element | undefined;
quickAdd?: React.ReactNode | undefined;
selectionHelpers: TSelectionHelper;
isEpic?: boolean;
};

View file

@ -15,7 +15,7 @@ import { ProjectService } from "@/services/project";
type Props = {
integration: IWorkspaceIntegration;
value: any;
label: string | JSX.Element;
label: string | React.ReactNode;
onChange: (repo: any) => void;
characterLimit?: number;
};

View file

@ -66,7 +66,7 @@ export const SingleUserSelect: React.FC<Props> = ({ collaborator, index, users,
| {
value: string;
query: string;
content: JSX.Element;
content: React.ReactNode;
}[]
| undefined;

View file

@ -54,7 +54,7 @@ export const JiraImportUsers: FC = () => {
| {
value: string;
query: string;
content: JSX.Element;
content: React.ReactNode;
}[]
| undefined;

View file

@ -4,7 +4,7 @@ import React, { FC } from "react";
import { cn } from "@plane/utils";
type Props = {
icon: JSX.Element;
icon: React.ReactNode;
title: string;
disabled?: boolean;
};

View file

@ -31,7 +31,7 @@ const ActiveLoader = (props: { layout: EIssueLayoutTypes }) => {
};
interface Props {
children: string | JSX.Element | JSX.Element[];
children: string | React.ReactNode | React.ReactNode[];
layout: EIssueLayoutTypes;
}

View file

@ -42,7 +42,7 @@ type TQuickAddIssueRoot = {
layout: EIssueLayoutTypes;
prePopulatedData?: Partial<TIssue>;
QuickAddButton?: FC<TQuickAddIssueButton>;
customQuickAddButton?: JSX.Element;
customQuickAddButton?: React.ReactNode;
containerClassName?: string;
setIsQuickAddOpen?: (isOpen: boolean) => void;
quickAddCallback?: (projectId: string | null | undefined, data: TIssue) => Promise<TIssue | undefined>;

View file

@ -21,7 +21,7 @@ export type TWorkItemLabelSelectBaseProps = {
createLabelEnabled?: boolean;
disabled?: boolean;
getLabelById: (labelId: string) => IIssueLabel | null;
label?: JSX.Element;
label?: React.ReactNode;
labelIds: string[];
onChange: (value: string[]) => void;
onDropdownOpen?: () => void;

View file

@ -42,7 +42,7 @@ type Props = {
isDragging: boolean,
isDroppingInLabel: boolean,
dragHandleRef: MutableRefObject<HTMLButtonElement | null>
) => JSX.Element;
) => React.ReactNode;
onDrop: (
draggingLabelId: string,
droppedParentId: string | null,

View file

@ -50,7 +50,7 @@ export const MemberSelect: React.FC<Props> = observer((props) => {
| {
value: string;
query: string;
content: React.JSX.Element;
content: React.ReactNode;
}[]
| undefined;
const selectedOption = projectId ? getProjectMemberDetails(value, projectId.toString()) : null;

View file

@ -163,7 +163,7 @@ export const SendProjectInvitationModal: React.FC<Props> = observer((props) => {
| {
value: string;
query: string;
content: React.JSX.Element;
content: React.ReactNode;
}[]
| undefined;

View file

@ -9,7 +9,7 @@ import { usePlatformOS } from "@/hooks/use-platform-os";
type Props = {
href: string;
title: string;
icon: JSX.Element;
icon: React.ReactNode;
};
export const FavoriteItemTitle: FC<Props> = observer((props) => {