props를 styled component에 내려준다면, styled component에 타입을 지정해줘야한다.
// 중략
{allTown.map((item: string) => (
<div key={uuidv4()}>
<TownBtn
town={selectTown}
value={item}
onClick={onClickSelectTown}
>
{item}
</TownBtn>
</div>
))}
// 중략
const TownBtn = styled.button<{ town: string[]; value: string }>`
background-color: #dcdcdc;
width: 88px;
height: 26px;
margin: 3px;
border: none;
border-radius: 52px;
cursor: pointer;
border: ${({ value, town }) =>
town.includes(value) ? '2px solid #FEB819' : 'none'};
`;