diff --git a/src/components/icon.tsx b/src/components/icon.tsx index ee405908..1bbb0b9d 100644 --- a/src/components/icon.tsx +++ b/src/components/icon.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { Icon as SUIIcon } from 'semantic-ui-react'; import { SemanticDatepickerProps } from '../types'; -import { keys } from '../utils'; type CustomIconProps = { clearIcon: SemanticDatepickerProps['clearIcon']; @@ -16,12 +15,6 @@ const CustomIcon = ({ isClearIconVisible, onClear, }: CustomIconProps) => { - const onKeydown = (evt: KeyboardEvent) => { - if (evt.keyCode === keys.enter || evt.keyCode === keys.space) { - onClear(); - } - }; - if (isClearIconVisible && clearIcon && React.isValidElement(clearIcon)) { return React.cloneElement(clearIcon, { 'data-testid': 'datepicker-clear-icon', @@ -36,10 +29,7 @@ const CustomIcon = ({ data-testid="datepicker-clear-icon" link name={clearIcon} - role="button" - tabIndex="0" onClick={onClear} - onKeyDown={onKeydown} /> ); }