Skip to content

pantoken / renderers/mintlify/src / toMintlifyConfig

Função: toMintlifyConfig()

toMintlifyConfig(tokens): MintlifyTheme

Experimental

Construir as chaves de theming do Mintlify docs.json a partir de um IR de tokens.

Parâmetros

tokens

somente leitura Token[]

O IR (por exemplo, de @pantoken/tokens).

Retorna

MintlifyTheme

As chaves colors + background a serem mescladas em um docs.json do Mintlify.

Exemplo

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" } } }