|
1 | 1 | import React from 'react'; |
2 | 2 | import { Switch } from '@mui/material'; |
| 3 | +import ThemeToggle from './ThemeToggle'; |
3 | 4 |
|
4 | 5 | const RecordButton = ({ isRecording, onToggle }) => { |
5 | 6 | return ( |
6 | 7 | <div className='record-button-container'> |
7 | | - <div className='record-label'> |
8 | | - <div |
9 | | - className={`record-icon ${isRecording ? 'recording' : ''}`} |
10 | | - style={{ |
11 | | - backgroundColor: isRecording ? '#ef4444' : '#9ca3af', |
12 | | - transition: 'background-color 0.3s ease', |
| 8 | + <div className='record-controls'> |
| 9 | + <div className='record-label'> |
| 10 | + <div |
| 11 | + className={`record-icon ${isRecording ? 'recording' : ''}`} |
| 12 | + style={{ |
| 13 | + backgroundColor: isRecording ? '#ef4444' : '#9ca3af', |
| 14 | + transition: 'background-color 0.3s ease', |
| 15 | + }} |
| 16 | + /> |
| 17 | + <span>Record</span> |
| 18 | + </div> |
| 19 | + <Switch |
| 20 | + checked={isRecording} |
| 21 | + onChange={onToggle} |
| 22 | + sx={{ |
| 23 | + '& .MuiSwitch-switchBase': { |
| 24 | + color: '#9ca3af', |
| 25 | + }, |
| 26 | + '& .MuiSwitch-track': { |
| 27 | + backgroundColor: '#e5e7eb', |
| 28 | + }, |
| 29 | + '& .MuiSwitch-switchBase.Mui-checked': { |
| 30 | + color: '#374151', |
| 31 | + }, |
| 32 | + '& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track': { |
| 33 | + backgroundColor: '#0284c7', |
| 34 | + }, |
13 | 35 | }} |
14 | 36 | /> |
15 | | - <span>Record</span> |
16 | 37 | </div> |
17 | | - <Switch |
18 | | - checked={isRecording} |
19 | | - onChange={onToggle} |
20 | | - sx={{ |
21 | | - '& .MuiSwitch-switchBase': { |
22 | | - color: '#9ca3af', |
23 | | - }, |
24 | | - '& .MuiSwitch-track': { |
25 | | - backgroundColor: '#e5e7eb', |
26 | | - }, |
27 | | - '& .MuiSwitch-switchBase.Mui-checked': { |
28 | | - color: '#374151', |
29 | | - }, |
30 | | - '& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track': { |
31 | | - backgroundColor: '#0284c7', |
32 | | - }, |
33 | | - }} |
34 | | - /> |
| 38 | + <ThemeToggle /> |
35 | 39 | </div> |
36 | 40 | ); |
37 | 41 | }; |
|
0 commit comments