= ({
return (
{
- if (inputRef.current) inputRef.current.value = ''
- if (typeof propsOnChange === 'function') {
- // @ts-ignore TODO this is a hacky solution to clear
- propsOnChange({target: inputRef.current, currentTarget: inputRef.current})
- }
- }}
- />
- }
- className={clsx(classes.TextInput, className)}
- onChange={internalOnChange}
- onKeyDown={internalKeyDown}
- {...props}
+ {...mergeProps(
+ {
+ block: true,
+ leadingVisual: SearchIcon,
+ placeholder: 'Search',
+ trailingAction: (
+ {
+ if (inputRef.current) inputRef.current.value = ''
+ if (typeof propsOnChange === 'function') {
+ // @ts-ignore TODO this is a hacky solution to clear
+ propsOnChange({target: inputRef.current, currentTarget: inputRef.current})
+ }
+ }}
+ />
+ ),
+ className: clsx(classes.TextInput, className),
+ onChange: internalOnChange,
+ onKeyDown: internalKeyDown,
+ },
+ props,
+ )}
/>
)
}
@@ -518,7 +527,7 @@ SelectPanelFooter.__SLOT__ = Symbol('SelectPanel.Footer')
const SecondaryButton: React.FC = props => {
const size = useResponsiveValue(responsiveButtonSizes, 'small')
- return
+ return
}
const SecondaryLink: React.FC = ({className, ...props}) => {
@@ -526,7 +535,18 @@ const SecondaryLink: React.FC = ({className, ...props}) => {
return (
// @ts-ignore TODO: is as prop is not recognised by button?
-