mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 13:00:56 +03:00
27 lines
822 B
JavaScript
27 lines
822 B
JavaScript
import Box from '@mui/material/Box'
|
|
import PropTypes from 'prop-types'
|
|
import { Chip } from '@mui/material'
|
|
import './StarterPromptsCard.css'
|
|
|
|
const StarterPromptsCard = ({ isGrid, starterPrompts, sx, onPromptClick }) => {
|
|
return (
|
|
<Box
|
|
className={'button-container'}
|
|
sx={{ width: '100%', maxWidth: isGrid ? 'inherit' : '400px', p: 1.5, display: 'flex', gap: 1, ...sx }}
|
|
>
|
|
{starterPrompts.map((sp, index) => (
|
|
<Chip label={sp.prompt} className={'button'} key={index} onClick={(e) => onPromptClick(sp.prompt, e)} />
|
|
))}
|
|
</Box>
|
|
)
|
|
}
|
|
|
|
StarterPromptsCard.propTypes = {
|
|
isGrid: PropTypes.bool,
|
|
starterPrompts: PropTypes.array,
|
|
sx: PropTypes.object,
|
|
onPromptClick: PropTypes.func
|
|
}
|
|
|
|
export default StarterPromptsCard
|