mirror of
https://github.com/SomboChea/ui
synced 2026-01-19 17:46:12 +07:00
chore: update emotion dependencies
This commit is contained in:
35
src/muiComponents/AutoComplete/AutoCompleteTextField.tsx
Normal file
35
src/muiComponents/AutoComplete/AutoCompleteTextField.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import React from 'react';
|
||||
import styled from '@emotion/styled';
|
||||
import Search from '@material-ui/icons/Search';
|
||||
|
||||
import TextField, { TextFieldProps } from '../TextField';
|
||||
|
||||
const StyledTextField = styled(TextField)({
|
||||
'& .MuiInputBase-root': {
|
||||
color: 'white',
|
||||
},
|
||||
'& .MuiInput-underline': {
|
||||
':before': {
|
||||
content: "''",
|
||||
border: 'none',
|
||||
},
|
||||
':after': {
|
||||
borderColor: 'white',
|
||||
},
|
||||
':hover:before': {
|
||||
content: 'none',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const StyledSearch = styled(Search)({
|
||||
color: 'white',
|
||||
marginRight: 10,
|
||||
});
|
||||
|
||||
const AutoCompleteTextField: React.FC<TextFieldProps> = props => {
|
||||
// @ts-ignore: Types of property 'ref' are incompatible.
|
||||
return <StyledTextField {...props} InputProps={{ startAdornment: <StyledSearch /> }} />;
|
||||
};
|
||||
|
||||
export default AutoCompleteTextField;
|
||||
Reference in New Issue
Block a user