UNPKG

@sb1/ffe-buttons-react

Version:
21 lines (20 loc) 1.1 kB
import React, { ElementType, ForwardedRef } from 'react'; import { ComponentAsPropParams } from './types'; export type ExpandButtonProps<As extends ElementType = 'button'> = ComponentAsPropParams<As> & { /** An accessible label for the close-button, only shown in the "isExpanded" state */ closeLabel?: string; /** When true the component will render a circle with an X indicating whatever is controlled is in an expanded state. */ isExpanded: boolean; size?: 'sm' | 'md' | 'lg'; }; export declare const ExpandButton: <As extends ElementType>(props: { as?: As | undefined; } & import("./types").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "button" : As>, "as" & { ref: ForwardedRef<any>; }> & { /** An accessible label for the close-button, only shown in the "isExpanded" state */ closeLabel?: string; /** When true the component will render a circle with an X indicating whatever is controlled is in an expanded state. */ isExpanded: boolean; size?: "sm" | "md" | "lg"; } & React.RefAttributes<any>) => React.JSX.Element;