UNPKG

@carbon/react

Version:

React components for the Carbon Design System

20 lines (19 loc) 742 B
/** * Copyright IBM Corp. 2016, 2025 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import React, { type HTMLAttributes } from 'react'; type HTMLTagName = keyof HTMLElementTagNameMap; type WrapComponentArgs<T extends HTMLTagName> = { name: string; type: T; className?: string | ((prefix: string) => string); }; /** * @param {{ name: string, type: string, className?: string | (prefix: string) => string }} props * @returns */ declare const wrapComponent: <T extends HTMLTagName>({ name, className: getClassName, type, }: WrapComponentArgs<T>) => ((props: HTMLAttributes<T>) => React.ReactElement<any>); export default wrapComponent;