diff --git a/src/Chip/ChipIcon.tsx b/src/Chip/ChipIcon.tsx index af487eb86f..8ef97ef1ee 100644 --- a/src/Chip/ChipIcon.tsx +++ b/src/Chip/ChipIcon.tsx @@ -7,9 +7,7 @@ import { STYLE_VARIANTS } from './constants'; export type ChipIconProps = { className: string, src: React.ComponentType, - onClick?: KeyboardEventHandler & MouseEventHandler, - alt?: string, - variant: string, + variant: typeof STYLE_VARIANTS[keyof typeof STYLE_VARIANTS], disabled?: boolean, } & ( // Either _both_ onClick and alt are provided, or neither is: diff --git a/src/IconButton/__snapshots__/IconButton.test.tsx.snap b/src/IconButton/__snapshots__/IconButton.test.tsx.snap index 58429cad8c..dd82977c10 100644 --- a/src/IconButton/__snapshots__/IconButton.test.tsx.snap +++ b/src/IconButton/__snapshots__/IconButton.test.tsx.snap @@ -47,11 +47,33 @@ exports[` renders with deprecated props 1`] = ` - + `; diff --git a/src/IconButton/index.tsx b/src/IconButton/index.tsx index 5e38e1b35f..601479cd0e 100644 --- a/src/IconButton/index.tsx +++ b/src/IconButton/index.tsx @@ -2,9 +2,9 @@ import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { type Placement } from 'react-bootstrap/Overlay'; -import Icon from '../Icon'; import { OverlayTrigger } from '../Overlay'; import Tooltip from '../Tooltip'; +import Icon from '../Icon'; interface Props extends React.HTMLAttributes { iconAs?: React.ComponentType,