theluyuan 38ba663466
Some checks failed
Close stale issues and PRs / stale (push) Has been cancelled
init
2025-09-02 14:49:16 +08:00

33 lines
887 B
TypeScript

import React, { useCallback } from 'react';
import { useDispatch } from 'react-redux';
import Button from '../../../base/ui/components/native/Button';
import { BUTTON_TYPES } from '../../../base/ui/constants.native';
import { createBreakoutRoom } from '../../actions';
import styles from './styles';
/**
* Button to add a breakout room.
*
* @returns {JSX.Element} - The add breakout room button.
*/
const AddBreakoutRoomButton = () => {
const dispatch = useDispatch();
const onAdd = useCallback(() =>
dispatch(createBreakoutRoom())
, [ dispatch ]);
return (
<Button
accessibilityLabel = 'breakoutRooms.actions.add'
labelKey = 'breakoutRooms.actions.add'
onClick = { onAdd }
style = { styles.button }
type = { BUTTON_TYPES.SECONDARY } />
);
};
export default AddBreakoutRoomButton;