Skip to content

pantoken-root / css-in-js

css-in-js ​

Compatibility ​

Target: Emotion CSS-in-JS. Current format: ThemeProvider SSR emits the Pantoken token variable. Minimum host version: 11.14.0. Tested through 11.14.0. Newer releases require review.

Full compatibility matrix

Eksperimantal

@pantoken/css-in-js — yon objè tèm Instructure pou bibliyotèk CSS-in-JS k ap kouri a.

Travay ak nenpòt bibliyotèk ki li yon tèm soti nan props.theme — Emotion, styled-components, ak Stitches tout pataje konvansyon sa a. pantokenTheme se objè rebrand ki pare, sipòte pa var() pou chanjman limyè/fènwa pase atravè @pantoken/css. toStyledTheme konstwi youn soti nan nenpòt IR (epi li ka enkòpore valè konkrè ak { resolve }).

Egzanp ​

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};`;

Entèfas ​

Alyas tip ​

Varyab ​

Fonksyon ​

Referans ​

Mode ​

Re-ekspòte Mode


default ​

Renome epi re-eksporte pantokenTheme