Replace palette by applyStyles

This commit is contained in:
2024-10-21 15:43:16 +04:00
parent 0832595858
commit 6e82865743
2 changed files with 20 additions and 6 deletions
+8 -2
View File
@@ -8,11 +8,17 @@ const BorderLinearProgress = styled(LinearProgress)(({theme}) => ({
height: 10, height: 10,
borderRadius: 5, borderRadius: 5,
[`&.${linearProgressClasses.colorPrimary}`]: { [`&.${linearProgressClasses.colorPrimary}`]: {
backgroundColor: theme.palette.grey[theme.palette.mode === 'light' ? 200 : 800], backgroundColor: 200,
...theme.applyStyles('dark', {
backgroundColor: 800
})
}, },
[`& .${linearProgressClasses.bar}`]: { [`& .${linearProgressClasses.bar}`]: {
borderRadius: 5, borderRadius: 5,
backgroundColor: theme.palette.mode === 'light' ? '#1a90ff' : '#308fe8', backgroundColor: '#1a90ff',
...theme.applyStyles('dark', {
backgroundColor: '#308fe8'
})
}, },
})) }))
+12 -4
View File
@@ -28,8 +28,10 @@ const Widget = styled('div')(({theme}) => ({
margin: 'auto', margin: 'auto',
position: 'relative', position: 'relative',
zIndex: 1, zIndex: 1,
backgroundColor: backgroundColor: grey[200],
theme.palette.mode === 'dark' ? 'rgba(0,0,0,0.6)' : grey[200], ...theme.applyStyles('dark', {
backgroundColor: 'rgba(0,0,0,0.6)'
}),
backdropFilter: 'blur(40px)', backdropFilter: 'blur(40px)',
})) }))
@@ -170,7 +172,10 @@ export default function Lekte({audio, url, parole}) {
step={1} step={1}
max={duration || 100} max={duration || 100}
sx={{ sx={{
color: theme.palette.mode === 'dark' ? '#fff' : 'rgba(0,0,0,0.87)', color: 'rgba(0,0,0,0.87)',
...theme.applyStyles('dark', {
color: '#fff'
}),
height: 4, height: 4,
'& .MuiSlider-thumb': { '& .MuiSlider-thumb': {
width: 8, width: 8,
@@ -237,7 +242,10 @@ export default function Lekte({audio, url, parole}) {
defaultValue={volume} defaultValue={volume}
value={volume} value={volume}
sx={{ sx={{
color: theme.palette.mode === 'dark' ? '#fff' : 'rgba(0,0,0,0.87)', color: 'rgba(0,0,0,0.87)',
...theme.applyStyles('dark', {
color: '#fff'
}),
'& .MuiSlider-track': { '& .MuiSlider-track': {
border: 'none', border: 'none',
}, },