Skip to content
This repository was archived by the owner on Jan 16, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/Header/HeaderMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React, { MouseEvent } from 'react';
import IconButton from '@material-ui/core/IconButton';
import MenuItem from '@material-ui/core/MenuItem';
import Menu from '@material-ui/core/Menu';
import AccountCircle from '@material-ui/icons/AccountCircle';

import IconButton from '../../muiComponents/IconButton';

import HeaderGreetings from './HeaderGreetings';

interface Props {
Expand Down
3 changes: 2 additions & 1 deletion src/components/Header/HeaderRight.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState, useEffect, MouseEvent } from 'react';
import Button from '@material-ui/core/Button';

import Button from '../../muiComponents/Button';

import { RightSide } from './styles';
import HeaderToolTip from './HeaderToolTip';
Expand Down
3 changes: 2 additions & 1 deletion src/components/Header/HeaderToolTip.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import Tooltip from '@material-ui/core/Tooltip';

import Tooltip from '../../muiComponents/Tooltip';

import HeaderToolTipIcon, { TooltipIconType } from './HeaderToolTipIcon';

Expand Down
3 changes: 2 additions & 1 deletion src/components/Header/HeaderToolTipIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React from 'react';
import IconButton from '@material-ui/core/IconButton';
import Info from '@material-ui/icons/Info';
import Help from '@material-ui/icons/Help';
import Search from '@material-ui/icons/Search';

import IconButton from '../../muiComponents/IconButton';

import { IconSearchButton, StyledExternalLink } from './styles';

export type TooltipIconType = 'search' | 'help' | 'info';
Expand Down
2 changes: 1 addition & 1 deletion src/muiComponents/Avatar/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { forwardRef } from 'react';
import { default as MaterialUIAvatar, AvatarProps } from '@material-ui/core/Avatar';

// The default element type of MUI's Avatar is 'div' and we don't allow the change of this prop
type AvatarRef = HTMLElementTagNameMap['div'];
type AvatarRef = HTMLDivElement;

const Avatar = forwardRef<AvatarRef, AvatarProps>(function Avatar(props, ref) {
return <MaterialUIAvatar {...props} ref={ref} />;
Expand Down
2 changes: 1 addition & 1 deletion src/muiComponents/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { forwardRef } from 'react';
import { default as MaterialUIButton, ButtonProps } from '@material-ui/core/Button';

type ButtonRef = HTMLElementTagNameMap['button'];
type ButtonRef = HTMLButtonElement;

const Button = forwardRef<ButtonRef, ButtonProps>(function Button(props, ref) {
return <MaterialUIButton {...props} ref={ref} />;
Expand Down
2 changes: 1 addition & 1 deletion src/muiComponents/IconButton/IconButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { forwardRef } from 'react';
import { default as MaterialUIIconButton, IconButtonProps } from '@material-ui/core/IconButton';

type IconButtonRef = HTMLElementTagNameMap['button'];
type IconButtonRef = HTMLButtonElement;

const IconButton = forwardRef<IconButtonRef, IconButtonProps>(function IconButton(props, ref) {
return <MaterialUIIconButton {...props} ref={ref} />;
Expand Down
4 changes: 2 additions & 2 deletions src/muiComponents/TextField/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React, { forwardRef } from 'react';
import { default as MaterialUITextField, TextFieldProps } from '@material-ui/core/TextField';

// The default element type of MUI's TextField is 'div'
type TextFieldRef = HTMLElementTagNameMap['div'];
type TextFieldRef = HTMLDivElement;

const TextField = forwardRef<TextFieldRef, TextFieldProps>(function ToolTip({ InputProps, classes, ...props }, ref) {
const TextField = forwardRef<TextFieldRef, TextFieldProps>(function TextField({ InputProps, classes, ...props }, ref) {
return (
<MaterialUITextField
{...props}
Expand Down
2 changes: 1 addition & 1 deletion src/muiComponents/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { forwardRef } from 'react';
import { default as MaterialUITooltip, TooltipProps } from '@material-ui/core/Tooltip';

// The default element type of MUI's Tooltip is 'div' and the change of this prop is not allowed
type TooltipRef = HTMLElementTagNameMap['div'];
type TooltipRef = HTMLDivElement;

const Tooltip = forwardRef<TooltipRef, TooltipProps>(function ToolTip(props, ref) {
return <MaterialUITooltip {...props} innerRef={ref} />;
Expand Down