기본적인 사용법 import를 한다. 스타일을 작성한 뒤 변수에 할당한다. 요소에 적용한다. 예시 코드 // 1번 /** @jsxImportSource @emotion/react */ import { css } from "@emotion/react"; // 2번 const toggleBtn = css` list-style: none; margin: 3% 0 0 0; padding: 0; border: 0; border-top: #555555 2px solid; display: flex; position: sticky; top: 0; background-color: #fafafa; cursor: pointer; li { flex: 1; border: 1px solid #cccccc; text-align: center; height: 4vh; display: flex; align-items: center; justify-content: center; font-weight: 900; fo...
#emotion
#React
#typescript
#동적스타일
#동적으로스타일적용
#삼항연산자
#이모션
#타입스크립트
원문링크 : emotion.js 조건부 스타일 적용