Skip to content

pantoken / renderers/mui/src / toMuiTheme

Feidhm: toMuiTheme()

toMuiTheme(tokens, mode?): PantokenThemeOptions

Turgnamhach

Tóg roghanna téama MUI ó IR token.

Paraiméadair

tokens

neamh-inathraitheach Token[]

An IR (m.sh. ó @pantoken/tokens).

mode?

Mode = "light"

Cén mód datha le réiteach (réamhshocraithe "light").

Tuairisceáin

PantokenThemeOptions

Roghanna réidh do createTheme de MUI.

Sampla

Téama do gach branda agus do gach 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"));