UNPKG

@visa/nova-react

Version:

Visa Product Design System Nova React library. Compatible with React ^19.

27 lines (26 loc) 1.21 kB
import { type ElementType, type ReactElement } from 'react'; import { type UtilityFragmentProperties } from '../utility-fragment'; export type UtilityCustomProps<ET extends ElementType = 'div'> = Omit<UtilityFragmentProperties<ET>, ''>; export type UtilityProperties<ET extends ElementType = 'div'> = UtilityCustomProps<ET> & ({ /** Cloned Element (not compatible with tag property) */ element?: never; /** Tag (not compatible with element property) */ tag?: ElementType; } | { /** Cloned Element (not compatible with tag property) */ element?: ReactElement<UtilityCustomProps<ET>>; /** Tag (not compatible with element property) */ tag?: never; }); /** * Component used to create a div, by default, with the correct Nova utility style classes applied. * @docs {@link https://design.visa.com/base-elements/responsive-grid-system/breakpoints/?code_library=react | See Docs} * @related utility-fragment * @vgar 2.1 * @wcag 2.1 */ declare const Utility: { <ET extends ElementType = "div">({ children, className, element, tag: Tag, ...remainingProps }: UtilityProperties<ET>): import("react/jsx-runtime").JSX.Element; displayName: string; }; export default Utility;