I am learning React. I want to use styled-components to style "input type". I can expand props with normal "input type". But when I use styled-components, it doesn't work.. props are passed from the parent component.
import * as React from "react";
import { Input } from "./style";
export const Field: React.FC<React.ComponentProps<"input">> = (
props: React.ComponentProps<"input">
) => (
<>
{/* work */}
{/* <input {...props} type={"text"} /> */}
{/* it doesn't work.. */}
<Input {...props} type={"text"} />
</>
);
style.ts
import styled from "styled-components";
export const Input = styled.input`
//style
`;