mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-08 23:25:51 +01:00
refactor: replaces TxtField with TextField (#1133)
This commit is contained in:
parent
2362310aba
commit
b4b3978ae5
@ -6,7 +6,7 @@
|
||||
import React from 'react';
|
||||
import styled, { css } from 'react-emotion';
|
||||
|
||||
import TxtField from '../TxtField';
|
||||
import TextField from '../TextField';
|
||||
import { IInputField } from './types';
|
||||
|
||||
export const Wrapper = styled.div`
|
||||
@ -19,7 +19,7 @@ export const Wrapper = styled.div`
|
||||
`;
|
||||
|
||||
export const InputField = ({ color, ...others }: IInputField) => (
|
||||
<TxtField
|
||||
<TextField
|
||||
{...others}
|
||||
classes={{
|
||||
input: css`
|
||||
|
19
src/webui/components/TextField/index.js
Normal file
19
src/webui/components/TextField/index.js
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @prettier
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { TextFieldProps, default as TextFieldMaterialUI } from '@material-ui/core/TextField';
|
||||
|
||||
const TextField = ({ InputProps, classes, ...other }: TextFieldProps) => (
|
||||
<TextFieldMaterialUI
|
||||
{...other}
|
||||
InputProps={{
|
||||
...InputProps,
|
||||
classes,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
export default TextField;
|
@ -1,19 +0,0 @@
|
||||
/**
|
||||
* @prettier
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import TextField, { TextFieldProps } from '@material-ui/core/TextField';
|
||||
|
||||
const TxtField = ({ InputProps, classes, ...other }: TextFieldProps) => (
|
||||
<TextField
|
||||
{...other}
|
||||
InputProps={{
|
||||
...InputProps,
|
||||
classes,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
export default TxtField;
|
Loading…
Reference in New Issue
Block a user