UNPKG

@wordpress/components

Version:
16 lines (15 loc) • 568 B
import { paramCase } from "change-case"; import memoize from "memize"; // packages/components/src/context/get-styled-class-name-from-key.ts /** * Generates the connected component CSS className based on the namespace. * * @param namespace The name of the connected component. * @return The generated CSS className. */ function getStyledClassName(namespace) { return `components-${paramCase(namespace)}`; } const getStyledClassNameFromKey = memoize(getStyledClassName); export { getStyledClassNameFromKey }; //# sourceMappingURL=get-styled-class-name-from-key.mjs.map