NewChatButton.jsx 521 B

12345678910111213141516171819
  1. import { actionOpenModal } from "../reducers/modalReducer";
  2. import Box from '@mui/material/Box';
  3. import { Fab} from '@mui/material';
  4. import AddIcon from '@mui/icons-material/Add';
  5. import { connect } from "react-redux";
  6. const NewChatButton = ({setOpen}) => {
  7. return (
  8. <Box sx={{ '& > :not(style)': { m: 1 } }}>
  9. <Fab color="secondary" aria-label="add">
  10. <AddIcon onClick={() => setOpen('createChatModal')}/>
  11. </Fab>
  12. </Box>
  13. )
  14. }
  15. export default connect(null,{setOpen : actionOpenModal})(NewChatButton)