2022-01-10 08:05:03 +01:00
|
|
|
import React from 'react'
|
|
|
|
|
import { SendIcon } from '../../../../assets/icons'
|
|
|
|
|
|
|
|
|
|
type SendButtonProps = {
|
|
|
|
|
label: string
|
2022-01-12 09:10:59 +01:00
|
|
|
isDisabled?: boolean
|
2022-01-10 08:05:03 +01:00
|
|
|
} & React.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
|
|
|
|
|
|
|
export const SendButton = ({
|
|
|
|
|
label,
|
|
|
|
|
isDisabled,
|
|
|
|
|
...props
|
|
|
|
|
}: SendButtonProps) => {
|
|
|
|
|
return (
|
|
|
|
|
<button
|
|
|
|
|
type="submit"
|
|
|
|
|
disabled={isDisabled}
|
|
|
|
|
{...props}
|
2022-01-12 09:10:59 +01:00
|
|
|
className={
|
2022-02-07 08:05:53 +01:00
|
|
|
'py-2 px-4 font-semibold rounded-md text-white focus:outline-none flex items-center disabled:opacity-50 disabled:cursor-not-allowed disabled:brightness-100 transition-all filter hover:brightness-90 active:brightness-75 typebot-button ' +
|
2022-01-12 09:10:59 +01:00
|
|
|
props.className
|
|
|
|
|
}
|
2022-01-10 08:05:03 +01:00
|
|
|
>
|
|
|
|
|
<span className="hidden xs:flex">{label}</span>
|
|
|
|
|
<SendIcon className="send-icon flex xs:hidden" />
|
|
|
|
|
</button>
|
|
|
|
|
)
|
|
|
|
|
}
|