[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:
parent
1ef30746a2
commit
a085c0ec62
43 changed files with 102 additions and 57 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ type DropdownOptions =
|
|||
| {
|
||||
value: string | null;
|
||||
query: string;
|
||||
content: JSX.Element;
|
||||
content: React.ReactNode;
|
||||
}[]
|
||||
| undefined;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ type DropdownOptions =
|
|||
| {
|
||||
value: string | null;
|
||||
query: string;
|
||||
content: JSX.Element;
|
||||
content: React.ReactNode;
|
||||
}[]
|
||||
| undefined;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ type DropdownOptions =
|
|||
| {
|
||||
value: string | null;
|
||||
query: string;
|
||||
content: JSX.Element;
|
||||
content: React.ReactNode;
|
||||
}[]
|
||||
| undefined;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ type Props = {
|
|||
currentView: TGanttViews,
|
||||
targetDate?: Date
|
||||
) => ChartDataType | undefined;
|
||||
quickAdd?: React.JSX.Element | undefined;
|
||||
quickAdd?: React.ReactNode | undefined;
|
||||
isEpic?: boolean;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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>;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ export const SingleUserSelect: React.FC<Props> = ({ collaborator, index, users,
|
|||
| {
|
||||
value: string;
|
||||
query: string;
|
||||
content: JSX.Element;
|
||||
content: React.ReactNode;
|
||||
}[]
|
||||
| undefined;
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export const JiraImportUsers: FC = () => {
|
|||
| {
|
||||
value: string;
|
||||
query: string;
|
||||
content: JSX.Element;
|
||||
content: React.ReactNode;
|
||||
}[]
|
||||
| undefined;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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>;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ type Props = {
|
|||
isDragging: boolean,
|
||||
isDroppingInLabel: boolean,
|
||||
dragHandleRef: MutableRefObject<HTMLButtonElement | null>
|
||||
) => JSX.Element;
|
||||
) => React.ReactNode;
|
||||
onDrop: (
|
||||
draggingLabelId: string,
|
||||
droppedParentId: string | null,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ export const SendProjectInvitationModal: React.FC<Props> = observer((props) => {
|
|||
| {
|
||||
value: string;
|
||||
query: string;
|
||||
content: React.JSX.Element;
|
||||
content: React.ReactNode;
|
||||
}[]
|
||||
| undefined;
|
||||
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue