@sb1/ffe-buttons-react
Version:
React implementation of ffe-buttons
37 lines (36 loc) • 1.39 kB
TypeScript
import React, { ElementType, ForwardedRef, ReactElement } from 'react';
import { ComponentAsPropParams } from './types';
export type InlineBaseButtonProps<As extends ElementType = 'button'> = ComponentAsPropParams<As> & {
/**
* Enum of supported prop types. Used internally only.
* @ignore
*/
buttonType: 'tertiary' | 'back' | 'expand';
/** Icon shown to the left of the label */
leftIcon?: ReactElement;
/** Icon shown to the right of the label */
rightIcon?: ReactElement;
/** Size of the button, default md. */
size?: 'sm' | 'md' | 'lg';
/** Using only an icon, no label */
iconOnly?: boolean;
};
export declare const InlineBaseButton: <As extends ElementType>(props: {
as?: As | undefined;
} & import("./types").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "button" : As>, "as" & {
ref: ForwardedRef<any>;
}> & {
/**
* Enum of supported prop types. Used internally only.
* @ignore
*/
buttonType: "tertiary" | "back" | "expand";
/** Icon shown to the left of the label */
leftIcon?: ReactElement;
/** Icon shown to the right of the label */
rightIcon?: ReactElement;
/** Size of the button, default md. */
size?: "sm" | "md" | "lg";
/** Using only an icon, no label */
iconOnly?: boolean;
} & React.RefAttributes<any>) => React.JSX.Element;