score:1

Accepted answer
// Your styled components receives now a prop with the name currentColor.
// Use it inside the interpolation string ${} and set the value
const SelectColor = styled.div`
  select{
    background-color: ${(props) => props.currentColor || 'black'};
  }
  .label{
    width: 150px;
    font-size: 14px;
    text-align: left;
    margin-left: 6px;
  }
`;

score:1

 const handlestring = (e) => {
   setSelectedValue(e.target.value)
}

Related Query

More Query from same tag