강의

멘토링

커뮤니티

Inflearn Community Q&A

withkey's profile image
withkey

asked

[React / VanillaJS] Creating UI elements directly Part 1

Accordion (1/6) Rendering only visible elements

class 자동완성 방법은 없을까요?

Resolved

Written on

·

521

0

classnames/bind 를 사용하지 않고, classnames를 사용할 때, typescript-plugin-css-modules 라는 것을 사용하면

 

위와 같이 현재 scss파일 안에 있는 클래스들이 보여지게 되는데요! classnames/bind 를 통해 cx를 만들어 사용할 때도 클래스들이 자동완성 됐으면 좋겠다고 생각이 들었습니다. 혹시 이것에 대한 방법이 있을까요?

reacttypescriptdomuivanilla-js

Answer 2

1

jaenam님의 프로필 이미지
jaenam
Instructor

다음 내용을 참고하시면 될 것 같습니다.

https://github.com/JedWatson/classnames/issues/300

다만 매번 .css.d.ts 파일을 생성해야 동작하므로 딱히 좋아보이진 않네요.
혹시 더 나은 방법을 알고 계시는 분은 여기에 공유해 주시면 좋겠네요!

0

withkey님의 프로필 이미지
withkey
Questioner

앗 감사합니다. 한번 보고 고민을 해보겠습니다 ㅎㅎ

withkey's profile image
withkey

asked

Ask a question