UNPKG

@wordpress/components

Version:
26 lines 756 B
/** * Creates a dedicated context namespace HTML attribute for components. * ns is short for "namespace" * * @example * ```jsx * <div {...ns('Container')} /> * ``` * * @param {string} componentName The name for the component. * @return {Record<string, any>} A props object with the namespaced HTML attribute. */ export function getNamespace(componentName: string): Record<string, any>; /** * Creates a dedicated connected context namespace HTML attribute for components. * ns is short for "namespace" * * @example * ```jsx * <div {...cns()} /> * ``` * * @return {Record<string, any>} A props object with the namespaced HTML attribute. */ export function getConnectedNamespace(): Record<string, any>; //# sourceMappingURL=utils.d.ts.map