So, I attempted to capitalise, without success, the first character entered into an input box as follows:
Styled component
const SearchStyles = styled.div`
position: relative;
input {
width: 100%;
padding: 10px;
border: 0;
font-size: 2rem;
&.loading {
animation: ${glow} 0.5s ease-in-out infinite alternate;
}
&:first-letter {
text-transform: uppercase;
}
}
`;
React
<input
{...getInputProps({
type: 'search',
placeholder: 'Search For An Item',
id: 'search',
className: this.state.loading ? 'loading' : '',
onChange: e => {
e.persist();
this.onChange(e, client);
},
})}
/>
How do I resolve this?