@engie-group/fluid-design-system-react
Version:
Fluid Design System React
36 lines (35 loc) • 1.36 kB
TypeScript
import React, { PropsWithChildren } from 'react';
import { NJButtonProps } from '../button/NJButton';
export type NJModalTriggerProps = NJModalTriggerButtonProps | NJModalTriggerAsChildProps;
export type NJModalTriggerButtonProps = React.HTMLProps<HTMLElement> & NJButtonProps & {
asChild?: never;
};
export type NJModalTriggerAsChildProps = PropsWithChildren & {
/**
* Change the default rendered element for the one passed as a child, merging their props and behavior.
*/
asChild: boolean;
};
export declare const NJModalTrigger: React.ForwardRefExoticComponent<(NJModalTriggerAsChildProps | Omit<React.HTMLProps<HTMLElement> & import("@engie-group/fluid-types").ButtonProperties & {
visuallyDisabled?: boolean;
} & {
asChild: true;
} & {
children?: React.ReactNode | undefined;
} & {
asChild?: never;
}, "ref"> | Omit<React.HTMLProps<HTMLElement> & import("@engie-group/fluid-types").ButtonProperties & {
visuallyDisabled?: boolean;
} & {
asChild?: false;
} & import("../../utils/typeHelpers").HTMLAttributesWithoutComponentProps<"button", import("@engie-group/fluid-types").ButtonProperties & {
visuallyDisabled?: boolean;
} & {
label?: string;
iconClassName?: string;
}> & {
label?: string;
iconClassName?: string;
} & {
asChild?: never;
}, "ref">) & React.RefAttributes<HTMLElement>>;