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

Turgnamhach

@pantoken/css-in-js — réad téama Instructure do leabharlanna CSS-in-JS ag rith.

Oibríonn sé le haon leabharlann a léann téama ón props.theme — roinneann Emotion, styled-components, agus Stitches an nós sin. Is é pantokenTheme an réad rebrand réidh le húsáid, tacaíocht var() ionas go sruthóidh an lasc soiléir/dorcha tríd an @pantoken/css. Tógann toStyledTheme ceann ó aon IR (agus is féidir luachanna concréite a chur isteach le { resolve }).

Sampla ​

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

Comhéadan ​

Aliasanna Cineál ​

Athróga ​

Feidhmeanna ​

Tagairtí ​

Mode ​

Ath-easpórtálann Mode


default ​

Athainmníonn agus ath-easpórtálann pantokenTheme