UNPKG

@gechiui/components

Version:
32 lines (27 loc) 650 B
// @ts-nocheck /** * GeChiUI dependencies */ import deprecated from '@gechiui/deprecated'; import { forwardRef } from '@gechiui/element'; /** * Internal dependencies */ import Button from '../button'; function IconButton( { labelPosition, size, tooltip, label, ...props }, ref ) { deprecated( 'gc.components.IconButton', { since: '5.4', alternative: 'gc.components.Button', } ); return ( <Button { ...props } ref={ ref } tooltipPosition={ labelPosition } iconSize={ size } showTooltip={ tooltip !== undefined ? !! tooltip : undefined } label={ tooltip || label } /> ); } export default forwardRef( IconButton );