Skip to content

Instantly share code, notes, and snippets.

@LukeSmetham
Created September 23, 2019 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save LukeSmetham/ce741495034353a945e2d2f847a7927c to your computer and use it in GitHub Desktop.
Save LukeSmetham/ce741495034353a945e2d2f847a7927c to your computer and use it in GitHub Desktop.
import React from 'react'; // eslint-disable-line no-unused-vars
import styled from 'styled-components';
const Root = styled.input`
border: 0;
border-radius: 8px;
font-size: 16px;
padding: 20px;
color: white;
margin: 16px 0px;
background-color: ${({ theme }) => theme.colorUtils.fade(theme.color.white, 0.08)};
&::placeholder {
color: #ffffff;
}
&:focus {
background-color: ${({ theme }) => theme.colorUtils.fade(theme.color.white, 0.16)};
}
&:hover {
background-color: ${({ theme }) => theme.colorUtils.fade(theme.color.white, 0.16)};
}
`;
const Input = React.forwardRef(({ field, ...props }, ref) => <Root ref={ref} {...field} {...props} />);
export default Input;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment