Skip to content

Commit

Permalink
fix: use ReactElement instead of JSX.Element
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Jul 29, 2024
1 parent 1566417 commit 2921eb2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/app/about/AboutDialogToolbarButton.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Dialog, DialogBody } from '@blueprintjs/core';
import { IconName } from '@blueprintjs/icons';
import { JSX, ReactNode } from 'react';
import { type ReactElement, ReactNode } from 'react';

import { Toolbar, useOnOff } from '../../components';

interface AboutDialogToolbarButtonProps {
name: string;
icon: IconName | JSX.Element;
icon: IconName | ReactElement;
body: ReactNode;
}

Expand Down
11 changes: 5 additions & 6 deletions src/components/toolbar/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ import {
ButtonGroup,
Classes,
Colors,
Icon,
Intent,
Popover,
PopoverProps,
TagProps,
Icon,
TooltipProps,
} from '@blueprintjs/core';
import { IconName } from '@blueprintjs/icons';
import { css } from '@emotion/react';
import {
cloneElement,
JSX,
MouseEvent,
ReactElement,
ReactNode,
type MouseEvent,
type ReactElement,
type ReactNode,
useLayoutEffect,
useMemo,
useRef,
Expand Down Expand Up @@ -57,7 +56,7 @@ export interface ToolbarItemProps extends ToolbarBaseProps {
id?: string;
tooltip?: TooltipProps['content'];
tooltipProps?: Omit<TooltipProps, 'content'>;
icon: IconName | JSX.Element;
icon: IconName | ReactElement;
active?: boolean;
onClick?: (
item: ToolbarItemProps & {
Expand Down
8 changes: 4 additions & 4 deletions stories/components/toolbar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { Menu, MenuItem, Tooltip } from '@blueprintjs/core';
import { Meta } from '@storybook/react';
import { JSX, useState } from 'react';
import { type ReactElement, useState } from 'react';
import { BiClipboard, BiCreditCard, BiPaperclip } from 'react-icons/bi';
import { FaClipboard, FaCreditCard, FaPaperclip } from 'react-icons/fa6';
import { HiClipboard, HiCreditCard, HiOutlinePaperClip } from 'react-icons/hi2';

import {
PopoverInteractionType,
Toolbar,
ToolbarItemProps,
ToolbarProps,
PopoverInteractionType,
TooltipItem,
TooltipHelpContent,
TooltipItem,
} from '../../src/components';

export default {
Expand All @@ -34,7 +34,7 @@ export default {
type ToolbarItems = Array<
Pick<ToolbarItemProps, 'tooltip' | 'icon' | 'disabled'> & {
id: string;
content?: JSX.Element;
content?: ReactElement;
}
>;

Expand Down

0 comments on commit 2921eb2

Please sign in to comment.