2
0
Files
bot/packages/bot-engine/src/components/ChatBlock/ChatStep/inputs/SendButton.tsx

29 lines
802 B
TypeScript
Raw Normal View History

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={
'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>
)
}