Skip to content

Commit

Permalink
refactor: 접근성 개선 및 상품명 1줄만 나오도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
feb-dain committed May 15, 2023
1 parent abf8436 commit 6f13553
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/ProductItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ const ProductItem = ({ id, imgUrl, name, price }: Props) => {

return (
<div>
<S.Image src={imgUrl} />
<S.Image src={imgUrl} alt={name} />
<S.InfoWrapper>
<div>
<S.Name htmlFor={name}>{name}</S.Name>
<S.Name htmlFor={name} title={name}>
{name}
</S.Name>
<S.Price>
{price.toLocaleString()}
<span></span>
Expand Down Expand Up @@ -79,12 +81,17 @@ const S = {
`,

Name: styled.label`
display: -webkit-box;
margin-right: 4px;
font-weight: 400;
line-height: 1.4;
letter-spacing: 0.5px;
color: var(--text-color);
opacity: 0.9;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
@media (max-width: 1270px) {
font-size: 15px;
Expand Down

0 comments on commit 6f13553

Please sign in to comment.