mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 11:01:22 +03:00
cb0eb67df0
* Use tabler icons react instead of tabler icons package * Update package.json --------- Co-authored-by: Octavian Cioaca <devtools@domselardi.com>
32 lines
973 B
React
32 lines
973 B
React
import PropTypes from 'prop-types'
|
|
import { useSelector } from 'react-redux'
|
|
import { IconButton } from '@mui/material'
|
|
import { IconThumbDown } from '@tabler/icons-react'
|
|
|
|
const ThumbsDownButton = (props) => {
|
|
const customization = useSelector((state) => state.customization)
|
|
return (
|
|
<IconButton
|
|
disabled={props.isDisabled || props.isLoading}
|
|
onClick={props.onClick}
|
|
size='small'
|
|
sx={{ background: 'transparent', border: 'none' }}
|
|
title='Thumbs Down'
|
|
>
|
|
<IconThumbDown
|
|
style={{ width: '20px', height: '20px' }}
|
|
color={props.rating === 'THUMBS_DOWN' ? '#9e9e9e' : customization.isDarkMode ? 'white' : '#1e88e5'}
|
|
/>
|
|
</IconButton>
|
|
)
|
|
}
|
|
|
|
ThumbsDownButton.propTypes = {
|
|
isDisabled: PropTypes.bool,
|
|
isLoading: PropTypes.bool,
|
|
onClick: PropTypes.func,
|
|
rating: PropTypes.string
|
|
}
|
|
|
|
export default ThumbsDownButton
|