1
0
Fork 1
mirror of https://github.com/SomboChea/ui synced 2024-05-19 09:51:36 +07:00
verdaccio-ui/src/components/AutoComplete/styles.tsx
Priscila Oliveira 111f0c50e5 feat: Added Theme and migrate to emotion@10.x 🚀 (#286)
* chore: updated emotion dependency

* feat: introduced theme

* refactor: updated emotion styles

* fix: fixed emotion error

* fix: fixed tests

* chore: add missing types

Co-Authored-By: Thomas Klein <tmkn@users.noreply.github.com>
2019-11-23 13:41:14 +01:00

45 lines
1.1 KiB
TypeScript

import React from 'react';
import styled from '@emotion/styled';
import TextField from '../../muiComponents/TextField';
import Paper from '../../muiComponents/Paper';
import { Theme } from '../../design-tokens/theme';
export interface InputFieldProps {
color: string;
}
export const Wrapper = styled('div')({
width: '100%',
height: '32px',
position: 'relative',
zIndex: 1,
});
export const StyledTextField = styled(TextField)<{ theme?: Theme }>(props => ({
'& .MuiInputBase-root': {
':before': {
content: "''",
border: 'none',
},
':after': {
borderColor: props.theme && props.theme.palette.white,
},
':hover:before': {
content: 'none',
},
},
'& .MuiInputBase-input': {
color: props.theme && props.theme.palette.white,
},
}));
/* eslint-disable verdaccio/jsx-spread */
// @ts-ignore types of color are incompatible
export const InputField: React.FC<InputFieldProps> = ({ ...others }) => <StyledTextField {...others} />;
export const SuggestionContainer = styled(Paper)({
maxHeight: '500px',
overflowY: 'auto',
});