Skip to content

Commit

Permalink
Add copyIconClassName to textinput
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeprins committed Oct 23, 2023
1 parent baf586f commit d4388ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface Props extends HTMLAttributes<HTMLInputElement> {
onCloseIconClick?: () => void
searchIconClassName?: string
closeIconClassName?: string
copyIconClassName?: string
prepend?: string | JSX.Element | ReactNode
append?: string | JSX.Element | ReactNode
min?: string | number | undefined
Expand All @@ -45,6 +46,7 @@ export const TextInput = forwardRef<HTMLInputElement, Props>(function TextInput(
onCloseIconClick,
searchIconClassName = '',
closeIconClassName = '',
copyIconClassName = '',
prepend,
append,
...props
Expand Down Expand Up @@ -120,7 +122,7 @@ export const TextInput = forwardRef<HTMLInputElement, Props>(function TextInput(
<button
onClick={() => clipboard.copy(inputRef.current?.value)}
type="button"
className="absolute right-0 bg-white dark:bg-gray-800 top-[5px] p-1 mr-2 flex items-center justify-center text-gray-400 hover:text-gray-500 dark:text-white transition-all duration-200 rounded-md hover:bg-gray-100 focus:outline-none"
className={`absolute right-0 bg-white dark:bg-gray-800 top-[5px] p-1 mr-2 flex items-center justify-center text-gray-400 hover:text-gray-500 dark:text-white transition-all duration-200 rounded-md hover:bg-gray-100 focus:outline-none ${copyIconClassName}`}
data-testid="copy-button"
>
{clipboard.copied ? (
Expand Down

0 comments on commit d4388ca

Please sign in to comment.