"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-7309/react/features/participants-pane/components/breakout-rooms/components/web/AddBreakoutRoomButton.tsx" (31 May 2023, 1099 Bytes) of package /linux/misc/jitsi-meet-7309.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TSX (TypeScript with React) source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "AddBreakoutRoomButton.tsx": jitsi-meet_8319_vs_jitsi-meet_8615.

    1 import React, { useCallback } from 'react';
    2 import { useTranslation } from 'react-i18next';
    3 import { useDispatch } from 'react-redux';
    4 import { makeStyles } from 'tss-react/mui';
    5 
    6 import Button from '../../../../../base/ui/components/web/Button';
    7 import { BUTTON_TYPES } from '../../../../../base/ui/constants.web';
    8 import { createBreakoutRoom } from '../../../../../breakout-rooms/actions';
    9 
   10 const useStyles = makeStyles()(theme => {
   11     return {
   12         button: {
   13             marginTop: theme.spacing(3)
   14         }
   15     };
   16 });
   17 
   18 export const AddBreakoutRoomButton = () => {
   19     const { classes } = useStyles();
   20     const { t } = useTranslation();
   21     const dispatch = useDispatch();
   22 
   23     const onAdd = useCallback(() =>
   24         dispatch(createBreakoutRoom())
   25     , [ dispatch ]);
   26 
   27     return (
   28         <Button
   29             accessibilityLabel = { t('breakoutRooms.actions.add') }
   30             className = { classes.button }
   31             fullWidth = { true }
   32             labelKey = { 'breakoutRooms.actions.add' }
   33             onClick = { onAdd }
   34             type = { BUTTON_TYPES.SECONDARY } />
   35     );
   36 };