Skip to content

pantoken / css-in-js

css-in-js

실험적

@pantoken/css-in-js — 런타임 CSS-in-JS 라이브러리를 위한 Instructure 테마 객체.

어떤 라이브러리와도 함께 작동합니다 — props.theme에서 테마를 읽는 라이브러리(예: Emotion, styled-components, Stitches)는 모두 해당 관습을 공유합니다. pantokenTheme는 준비된 rebrand 객체로, var()-기반이어서 라이트/다크 전환이 @pantoken/css를 통해 전달됩니다. toStyledTheme는 모든 IR에서 하나를 생성하며 ({ resolve }로 구체 값을 고정할 수 있습니다).

예제

styled-components

tsx
import { ThemeProvider } from "styled-components";
import { pantokenTheme } from "@pantoken/css-in-js";
<ThemeProvider theme={pantokenTheme}>...</ThemeProvider>;
// const Btn = styled.button`background: ${({ theme }) => theme.colorBackgroundBrand};`;

인터페이스

타입 별칭

변수

함수

참조

Mode

Re-exports Mode를 재내보냅니다.


default

pantokenTheme의 이름을 변경하고 재내보냅니다.