Skip to content

pantoken / renderers/mui/src / toMuiTheme

Fonksyon: toMuiTheme()

toMuiTheme(tokens, mode?): PantokenThemeOptions

Eksperimantal

Bati opsyon tèm MUI soti nan yon IR token.

Paramèt

tokens

sèlman lekti Token[]

IR la (pa egzanp soti nan @pantoken/tokens).

mode?

Mode = "light"

Ki mòd koulè pou rezoud (default "light").

Retounen

PantokenThemeOptions

Opsyon pare pou createTheme MUI a.

Egzanp

Tèm pou chak mak, pou chak mòd

ts
import { createTheme } from "@mui/material/styles";
import { toMuiTheme } from "@pantoken/mui";
import { byTheme } from "@pantoken/tokens";

const darkCanvas = createTheme(toMuiTheme(byTheme("canvas"), "dark"));