๐Ÿ“šReadyBooks๐Ÿ“š 1์ฃผ์ฐจ ๊ณ ๋ฏผํ•œ ๊ฐœ๋ฐœ์˜ ํ”์ ๋“ค

Maria Kimยท2021๋…„ 12์›” 19์ผ
0
post-custom-banner

style-components ์—์„œ ๋‹ค๋ฅธ ์Šคํƒ€์ผ ์ปดํฌ๋„ŒํŠธ ๋ถˆ๋Ÿฌ์˜ค๋Š” ๋ฒ•

  • DeleteBtn ๋ถˆ์–ด์˜จ ๋ถ€๋ถ„์ด๋‹ค
&:hover ${DeleteBtn} {
    opacity: ${({ iswriter }) => (iswriter ? 1 : 0)};
  }

๋ฆฌ์•กํŠธ return ๋ถ€๋ถ„์—์„œ for ๋ฌธ์„ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์„๋•Œ ์“ฐ๋Š” ๋ฐฉ๋ฒ•

{[...Array(5)].map((_, i) => {
              return i < rate ? <AiFillStar /> : <AiOutlineStar 	/>;
})}
            

๋ฆฌ์•กํŠธ์—์„œ script ๋กœ ์–ด๋–ค ํŒŒ์ผ์„ ๋ฐ›์•„์„œ ํ•ด๋‹น ๋ถ€๋ถ„์„ ๋‹ค๋ฅธ react ๋ถ€๋ถ„์—์„œ ๋ถˆ๋Ÿฌ์™€ ์‚ฌ์šฉํ•  ๋•Œ

const { Kakao } = window;
profile
Frontend Developer, who has business in mind.

0๊ฐœ์˜ ๋Œ“๊ธ€