<S.EmotionButtonBox>
<S.EmotionButtonWrapper>
{hashtags.map((item, idx) => {
return <S.EmotionButton>{item}</S.EmotionButton>;
})}
</S.EmotionButtonWrapper>
</S.EmotionButtonBox>
style
export const EmotionButtonBox = styled.div`
display: 'block';
padding-bottom: 5px;
overflow-x: scroll;
`;
export const EmotionButtonWrapper = styled.div`
display: inline-block;
line-height: 29px;
width: 480px;
padding: 0px 20px;
gap: 8px;
`;
export const EmotionButton = styled.span`
padding: 5px 10px;
text-align: center;
border-radius: 14px;
border: 1px solid #292828;
margin: 5px 5px;
color: #292828;
font-size: 12px;
font-weight: 700;
line-height: 16px; /* 133.333% */
letter-spacing: 0.12px;
&:hover {
border: 1px solid #bd2024;
background-color: ${(props) => props.theme.redNormalColor};
color: white;
}
`;
가장 상위에 overflow-x: scroll
을 설정해주고 inline-block
으로 글자들이 세로로 나열되지 않도록 방지해줬다.