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