Skip to content

pantoken / renderers/mintlify/src / toMintlifyConfig

Función: toMintlifyConfig()

toMintlifyConfig(tokens): MintlifyTheme

Experimental

Construir las claves de tematización de Mintlify docs.json a partir de un IR de tokens.

Parámetros

tokens

solo lectura Token[]

El IR (p. ej. de @pantoken/tokens).

Devuelve

MintlifyTheme

Las claves colors + background para fusionar en un docs.json de Mintlify.

Ejemplo

ts
import { toMintlifyConfig } from "@pantoken/mintlify";
import { tokens } from "@pantoken/tokens";

const theme = toMintlifyConfig(tokens);
// { colors: { primary: "#1D354F", light: "#EEF4FD", dark: "#1D354F" },
//   background: { color: { light: "#F2F4F5", dark: "#10141A" } } }