Make padding-left optional on textinput

This commit is contained in:
Lei Nelissen
2022-05-17 23:05:45 +02:00
parent f1925347cb
commit c0fa1160ae

View File

@@ -1,10 +1,13 @@
import styled from 'styled-components/native';
import styled, { css } from 'styled-components/native';
const Input = styled.TextInput`
const Input = styled.TextInput<{ icon?: boolean }>`
margin: 10px 0;
border-radius: 8px;
padding: 15px;
padding-left: 40px;
${(props) => props.icon && css`
padding-left: 40px;
`}
`;
export default Input;