import React from 'react' ; import { TextInputProps } from 'react-native' ; import { px2ddp , PossibleThemes , useTheme } from '@animavita/theme' ; import styled from 'styled-components/native' ; export const StyledTextInput = styled . TextInput < { themeName : PossibleThemes ; } > `
  width: 100%;
  padding: ${ px2ddp ( 2 ) }px 0px;
  color: ${ ( { themeName , theme } ) => ( themeName === 'light' ? theme . black : theme . white ) };
` ; type InputProps = TextInputProps ; const Input = ( { ... props } ) => { const { themeName } = useTheme ( ) ; return < StyledTextInput themeName = { themeName } { ... props } />; } ; export default Input ;