import { useState } from 'react'
import styled from 'styled-components'
const DivContainer = styled.div`
border-radius: .5rem;
padding-block: .5rem;
box-shadow: 1px 1px 5px rgba(25, 25, 25, .65);
`
const InputControl = styled.input`
width: 80%;
padding: .5rem;
border-radius: .5rem;
margin-inline: auto;
background-color: ${({inputLength}) => inputLength < 1
? 'maroon': 'transparent' };
border: ${({inputLength}) => inputLength < 1
? '1px solid red': 'none' };
color: ${({inputLength}) => inputLength < 1 ? 'white': 'black' };
`
const userName = () => setUserName(userName)
const Card = () => (
const [ userName, setUserName] = ('');
<DivContainer>
<InputControl inputLength={userName.length}
value={userName}
onChange{handleUserName}
placeholder="Enter your name" />
</DivContainer>
)