Skip to content

pantoken-root / packages/core/src / varName

Functie: varName() ​

varName(prefix, path): string

Bèta

Maak een --instui-[prefix-]<kebab path>-naam voor een custom-property.

Parameters ​

prefix ​

string

path ​

string[]

Retourneert ​

string

Voorbeeld ​

ts
import { varName } from "@pantoken/core";

varName("primitive", ["color", "white"]);       // → "--instui-primitive-color-white"
varName("", ["spacing", "spaceMd"]);             // → "--instui-spacing-space-md"
varName("component", ["baseButton", "primaryBackground"]);
// → "--instui-component-base-button-primary-background"