Skip to content

Commit

Permalink
<SearchInput/> - return buttonCSSClassName
Browse files Browse the repository at this point in the history
  • Loading branch information
lakesare committed Jun 14, 2024
1 parent dea7e51 commit 563435a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/@uppy/provider-views/src/SearchInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type Props = {

showButton?: boolean
buttonLabel?: string
buttonCSSClassName?: string
}

function SearchInput({
Expand All @@ -31,6 +32,7 @@ function SearchInput({

showButton = false,
buttonLabel = '',
buttonCSSClassName = '',
}: Props) {
const onInput = (e: ChangeEvent) => {
setSearchString((e.target as HTMLInputElement).value)
Expand Down Expand Up @@ -108,7 +110,7 @@ function SearchInput({
)}
{showButton && (
<button
className="uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-SearchProvider-searchButton"
className={`uppy-u-reset uppy-c-btn uppy-c-btn-primary ${buttonCSSClassName}`}
type="submit"
form={form.id}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ export default class SearchProviderView<M extends Meta, B extends Body> {
wrapperClassName="uppy-SearchProvider"
inputClassName="uppy-c-textInput uppy-SearchProvider-input"
showButton
buttonCSSClassName="uppy-SearchProvider-searchButton"
/>
)
}
Expand Down

0 comments on commit 563435a

Please sign in to comment.