UNPKG

phx-react

Version:

PHX REACT

36 lines (35 loc) 1.42 kB
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; options?: Array<{ name: string; onClick(): any; }>; deleted?: boolean; deletedButton?: boolean; rounded?: boolean; size?: 'micro' | 'small' | 'medium' | 'large' | 'extra-large' | 'extra-micro'; children?: string | string[]; icon?: IconName; iconClassName?: string; iconOutline?: boolean; iconPosition?: 'before' | 'after'; style?: any; typeIcon?: keyof typeof typeIconMap; } export declare const PHXButton: ({ primary, secondary, danger, danger2, plain, tertiary, plainCritical, primaryCritical, split, options, soft, deleted, deletedButton, rounded, submit, size, children, icon, iconClassName, iconOutline, iconPosition, disabled, loading, id, onClick, className, style, typeIcon, }: ButtonProps) => React.JSX.Element; export {};