mirror of
https://github.com/SomboChea/ui
synced 2024-11-24 15:04:27 +07:00
fix: fixed imports & func's name (#182)
This commit is contained in:
parent
752e2b963d
commit
3888736e45
@ -1,9 +1,10 @@
|
|||||||
import React, { MouseEvent } from 'react';
|
import React, { MouseEvent } from 'react';
|
||||||
import IconButton from '@material-ui/core/IconButton';
|
|
||||||
import MenuItem from '@material-ui/core/MenuItem';
|
import MenuItem from '@material-ui/core/MenuItem';
|
||||||
import Menu from '@material-ui/core/Menu';
|
import Menu from '@material-ui/core/Menu';
|
||||||
import AccountCircle from '@material-ui/icons/AccountCircle';
|
import AccountCircle from '@material-ui/icons/AccountCircle';
|
||||||
|
|
||||||
|
import IconButton from '../../muiComponents/IconButton';
|
||||||
|
|
||||||
import HeaderGreetings from './HeaderGreetings';
|
import HeaderGreetings from './HeaderGreetings';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import React, { useState, useEffect, MouseEvent } from 'react';
|
import React, { useState, useEffect, MouseEvent } from 'react';
|
||||||
import Button from '@material-ui/core/Button';
|
|
||||||
|
import Button from '../../muiComponents/Button';
|
||||||
|
|
||||||
import { RightSide } from './styles';
|
import { RightSide } from './styles';
|
||||||
import HeaderToolTip from './HeaderToolTip';
|
import HeaderToolTip from './HeaderToolTip';
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Tooltip from '@material-ui/core/Tooltip';
|
|
||||||
|
import Tooltip from '../../muiComponents/Tooltip';
|
||||||
|
|
||||||
import HeaderToolTipIcon, { TooltipIconType } from './HeaderToolTipIcon';
|
import HeaderToolTipIcon, { TooltipIconType } from './HeaderToolTipIcon';
|
||||||
|
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import IconButton from '@material-ui/core/IconButton';
|
|
||||||
import Info from '@material-ui/icons/Info';
|
import Info from '@material-ui/icons/Info';
|
||||||
import Help from '@material-ui/icons/Help';
|
import Help from '@material-ui/icons/Help';
|
||||||
import Search from '@material-ui/icons/Search';
|
import Search from '@material-ui/icons/Search';
|
||||||
|
|
||||||
|
import IconButton from '../../muiComponents/IconButton';
|
||||||
|
|
||||||
import { IconSearchButton, StyledExternalLink } from './styles';
|
import { IconSearchButton, StyledExternalLink } from './styles';
|
||||||
|
|
||||||
export type TooltipIconType = 'search' | 'help' | 'info';
|
export type TooltipIconType = 'search' | 'help' | 'info';
|
||||||
|
@ -2,7 +2,7 @@ import React, { forwardRef } from 'react';
|
|||||||
import { default as MaterialUIAvatar, AvatarProps } from '@material-ui/core/Avatar';
|
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
|
// 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) {
|
const Avatar = forwardRef<AvatarRef, AvatarProps>(function Avatar(props, ref) {
|
||||||
return <MaterialUIAvatar {...props} ref={ref} />;
|
return <MaterialUIAvatar {...props} ref={ref} />;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React, { forwardRef } from 'react';
|
import React, { forwardRef } from 'react';
|
||||||
import { default as MaterialUIButton, ButtonProps } from '@material-ui/core/Button';
|
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) {
|
const Button = forwardRef<ButtonRef, ButtonProps>(function Button(props, ref) {
|
||||||
return <MaterialUIButton {...props} ref={ref} />;
|
return <MaterialUIButton {...props} ref={ref} />;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React, { forwardRef } from 'react';
|
import React, { forwardRef } from 'react';
|
||||||
import { default as MaterialUIIconButton, IconButtonProps } from '@material-ui/core/IconButton';
|
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) {
|
const IconButton = forwardRef<IconButtonRef, IconButtonProps>(function IconButton(props, ref) {
|
||||||
return <MaterialUIIconButton {...props} ref={ref} />;
|
return <MaterialUIIconButton {...props} ref={ref} />;
|
||||||
|
@ -2,9 +2,9 @@ import React, { forwardRef } from 'react';
|
|||||||
import { default as MaterialUITextField, TextFieldProps } from '@material-ui/core/TextField';
|
import { default as MaterialUITextField, TextFieldProps } from '@material-ui/core/TextField';
|
||||||
|
|
||||||
// The default element type of MUI's TextField is 'div'
|
// 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 (
|
return (
|
||||||
<MaterialUITextField
|
<MaterialUITextField
|
||||||
{...props}
|
{...props}
|
||||||
|
@ -2,7 +2,7 @@ import React, { forwardRef } from 'react';
|
|||||||
import { default as MaterialUITooltip, TooltipProps } from '@material-ui/core/Tooltip';
|
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
|
// 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) {
|
const Tooltip = forwardRef<TooltipRef, TooltipProps>(function ToolTip(props, ref) {
|
||||||
return <MaterialUITooltip {...props} innerRef={ref} />;
|
return <MaterialUITooltip {...props} innerRef={ref} />;
|
||||||
|
Loading…
Reference in New Issue
Block a user