Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: [M3-6306] - MUI v5 Migration SRC > Components > CopyableTextField #9018

Merged
merged 9 commits into from
Apr 27, 2023
cpathipa marked this conversation as resolved.
Show resolved Hide resolved
cpathipa marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as React from 'react';
import CopyTooltip from 'src/components/CopyTooltip';
import { makeStyles } from '@mui/styles';
import { makeStyles } from 'tss-react/mui';
import { Theme } from '@mui/material/styles';
import TextField, { Props as TextFieldProps } from 'src/components/TextField';

const useStyles = makeStyles((theme: Theme) => ({
const useStyles = makeStyles()((theme: Theme) => ({
removeDisabledStyles: {
'& .MuiInput-input': {
cpathipa marked this conversation as resolved.
Show resolved Hide resolved
borderColor: theme.name === 'light' ? '#ccc' : '#222',
Expand Down Expand Up @@ -36,8 +36,8 @@ type Props = TextFieldProps & {

type CombinedProps = Props;

export const CopyableTextField: React.FC<CombinedProps> = (props) => {
const classes = useStyles();
export const CopyableTextField = (props: CombinedProps) => {
const { classes } = useStyles();
const { value, className, hideIcon, ...restProps } = props;

return (
Expand All @@ -55,5 +55,3 @@ export const CopyableTextField: React.FC<CombinedProps> = (props) => {
/>
);
};

export default CopyableTextField;

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DateTime } from 'luxon';
import { update } from 'ramda';
import * as React from 'react';
import Button from 'src/components/Button';
import CopyableTextField from 'src/components/CopyableTextField';
import { CopyableTextField } from 'src/components/CopyableTextField/CopyableTextField';
import { makeStyles } from '@mui/styles';
import { Theme } from '@mui/material/styles';
import ToolTip from 'src/components/core/Tooltip';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import QRCode from 'qrcode.react';
import { compose } from 'ramda';
import * as React from 'react';
import CopyableTextField from 'src/components/CopyableTextField';
import { CopyableTextField } from 'src/components/CopyableTextField/CopyableTextField';
import { createStyles, withStyles, WithStyles } from '@mui/styles';
import { Theme } from '@mui/material/styles';
import Typography from 'src/components/core/Typography';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import Step1 from 'src/assets/referrals/step-1.svg';
import Step2 from 'src/assets/referrals/step-2.svg';
import Step3 from 'src/assets/referrals/step-3.svg';
import CopyableTextField from 'src/components/CopyableTextField';
import { CopyableTextField } from 'src/components/CopyableTextField/CopyableTextField';
import CircularProgress from 'src/components/core/CircularProgress';
import Paper from 'src/components/core/Paper';
import { makeStyles } from '@mui/styles';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import ActionsPanel from 'src/components/ActionsPanel';
import Button from 'src/components/Button';
import CopyableTextField from 'src/components/CopyableTextField';
import { CopyableTextField } from 'src/components/CopyableTextField/CopyableTextField';
import { createStyles, withStyles, WithStyles } from '@mui/styles';
import { Theme } from '@mui/material/styles';
import Typography from 'src/components/core/Typography';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import CopyableTextField from 'src/components/CopyableTextField';
import { CopyableTextField } from 'src/components/CopyableTextField/CopyableTextField';
import { createStyles, withStyles, WithStyles } from '@mui/styles';
import { Theme } from '@mui/material/styles';
import Typography from 'src/components/core/Typography';
Expand Down