UNPKG

@coconut-software/ui

Version:

React components for faster and easier web development.

26 lines (25 loc) 1.39 kB
import type { AriaAttributes, KeyboardEventHandler, MouseEventHandler, PropsWithChildren, Ref } from 'react'; import React from 'react'; export interface IconButtonProps { 'aria-label': AriaAttributes['aria-label']; 'aria-controls'?: AriaAttributes['aria-controls']; 'aria-expanded'?: AriaAttributes['aria-expanded']; 'aria-haspopup'?: AriaAttributes['aria-haspopup']; color?: IconButtonColor; dataSet?: Record<string, string | undefined>; disabled?: boolean; id?: string; onClick?: MouseEventHandler<HTMLButtonElement>; onKeyDown?: KeyboardEventHandler<HTMLButtonElement>; size?: IconButtonSize; tabIndex?: number; type?: IconButtonType; } type IconButtonColor = 'danger' | 'default' | 'inverse' | 'primary' | 'secondary'; type IconButtonSize = 'large' | 'medium' | 'small'; type IconButtonType = 'button' | 'reset' | 'submit'; export declare function Component({ 'aria-label': label, 'aria-controls': controls, 'aria-expanded': expanded, 'aria-haspopup': hasPopup, children, color, dataSet, disabled, id, onClick, onKeyDown, size, tabIndex, type, }: PropsWithChildren<IconButtonProps>, ref?: Ref<HTMLButtonElement>): JSX.Element; declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & { children?: React.ReactNode; } & React.RefAttributes<HTMLButtonElement>>; export default IconButton;