Skip to content

Commit

Permalink
feat: add proper types to styled
Browse files Browse the repository at this point in the history
  • Loading branch information
guilean committed Oct 30, 2020
1 parent 563eca9 commit 6edb411
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import styled from 'styled-components';
import { getTheme } from 'utils/getTheme';
import {
StyledBaseProps,
StyledCssProps,
} from 'components/Components.styled.types';
import { StyledCssProps } from 'components/Components.styled.types';
import { withCustomCss } from 'utils/withCustomCss';

type Props = StyledBaseProps & StyledCssProps;

export const StyledInput = withCustomCss(styled.input<Props>`
export const StyledInput = withCustomCss<
StyledCssProps &
React.ClassAttributes<StyledCssProps> &
React.InputHTMLAttributes<StyledCssProps>
>(styled.input`
background-color: ${(props) => getTheme(props).colors.fillFormEnabled};
position: relative;
display: block;
Expand Down

0 comments on commit 6edb411

Please sign in to comment.