Skip to content

Commit

Permalink
MOON-422: Remove triggerButtonIcon and isShowTriggerButton (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eevolee authored Nov 7, 2024
1 parent a274c67 commit 4f93ec2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
15 changes: 0 additions & 15 deletions src/components/Input/BaseInput/BaseInput.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,6 @@ export type BaseInputProps = {
*/
isShowClearButton?: boolean;

/**
* Whether the input should have a trigger button.
*/
isShowTriggerButton?: boolean;

/**
* Trigger button icon
*/
triggerButtonIcon?: React.ReactElement;

/**
* Component
*/
Expand All @@ -93,11 +83,6 @@ export type BaseInputProps = {
*/
onClear?: React.MouseEventHandler;

/**
* Function
*/
onTrigger?: React.MouseEventHandler;

/**
* Function triggered on change of the input value
*/
Expand Down
14 changes: 1 addition & 13 deletions src/components/Input/BaseInput/ControlledBaseInput.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {useEffect, useRef} from 'react';
import clsx from 'clsx';
import {Cancel, ChevronDown} from '~/icons';
import {Cancel} from '~/icons';
import {Button} from '~/components';
import './BaseInput.scss';
import {BaseInputProps} from './BaseInput.types';
Expand All @@ -17,12 +17,9 @@ export const ControlledBaseInput: React.FC<BaseInputProps> = ({
icon,
variant = 'outlined',
isShowClearButton,
isShowTriggerButton,
triggerButtonIcon = <ChevronDown/>,
prefixComponents,
onClick,
onKeyPress,
onTrigger,
onClear,
onChange,
onBlur,
Expand Down Expand Up @@ -90,15 +87,6 @@ export const ControlledBaseInput: React.FC<BaseInputProps> = ({
onClick={onClear}
/>
)}
{isShowTriggerButton && (
<Button
className="moonstone-baseInput_clearButton flexRow_center alignCenter"
variant="ghost"
icon={triggerButtonIcon}
aria-label="Open"
onClick={onTrigger}
/>
)}
</div>
);
};
Expand Down

0 comments on commit 4f93ec2

Please # to comment.