phx-react
Version:
PHX REACT
39 lines (38 loc) • 1.52 kB
TypeScript
import React from 'react';
import * as SolidIcons from '@heroicons/react/24/solid';
import * as OutlineIcons from '@heroicons/react/24/outline';
import { BaseButton } from '../types';
export type IconName = keyof typeof SolidIcons | keyof typeof OutlineIcons;
declare const typeIconMap: Record<string, keyof typeof SolidIcons>;
export interface ButtonProps extends BaseButton {
primary?: boolean;
secondary?: boolean;
danger?: boolean;
danger2?: boolean;
soft?: boolean;
plain?: boolean;
tertiary?: boolean;
plainCritical?: boolean;
primaryCritical?: boolean;
split?: boolean;
noPadding?: boolean;
options?: Array<{
name: string;
onClick(): any;
}>;
deleted?: boolean;
deletedButton?: boolean;
rounded?: boolean;
size?: 'micro' | 'small' | 'medium' | 'large' | 'extra-large' | 'extra-micro';
children?: React.ReactNode;
icon?: IconName;
iconClassName?: string;
iconOutline?: boolean;
iconPosition?: 'before' | 'after';
style?: any;
typeIcon?: keyof typeof typeIconMap;
soft2?: boolean;
squareSize?: number;
}
export declare const PHXButton: ({ primary, secondary, danger, danger2, plain, tertiary, plainCritical, primaryCritical, split, options, soft, soft2, deleted, deletedButton, rounded, submit, size, children, icon, iconClassName, iconOutline, iconPosition, disabled, loading, id, onClick, className, style, typeIcon, squareSize, noPadding, }: ButtonProps) => React.JSX.Element;
export {};