diff --git a/docs/pages/experiments/material-ui/image-list-item-bar.tsx b/docs/pages/experiments/material-ui/image-list-item-bar.tsx new file mode 100644 index 00000000000000..07917a9cb5a50b --- /dev/null +++ b/docs/pages/experiments/material-ui/image-list-item-bar.tsx @@ -0,0 +1,98 @@ +import * as React from 'react'; +import { + Experimental_CssVarsProvider as CssVarsProvider, + useColorScheme, +} from '@mui/material/styles'; +import CssBaseline from '@mui/material/CssBaseline'; +import Box from '@mui/material/Box'; +import Button from '@mui/material/Button'; +import Container from '@mui/material/Container'; +import ImageList from '@mui/material/ImageList'; +import ImageListItem from '@mui/material/ImageListItem'; +import ImageListItemBar from '@mui/material/ImageListItemBar'; +import ListSubheader from '@mui/material/ListSubheader'; +import Moon from '@mui/icons-material/DarkMode'; +import Sun from '@mui/icons-material/LightMode'; + +const itemData = [ + { + img: 'https://images.unsplash.com/photo-1551963831-b3b1ca40c98e', + title: 'Breakfast', + author: '@bkristastucchio', + rows: 2, + cols: 2, + featured: true, + }, + { + img: 'https://images.unsplash.com/photo-1551782450-a2132b4ba21d', + title: 'Burger', + author: '@rollelflex_graphy726', + }, +]; + +const ColorSchemePicker = () => { + const { mode, setMode } = useColorScheme(); + const [mounted, setMounted] = React.useState(false); + React.useEffect(() => { + setMounted(true); + }, []); + if (!mounted) { + return null; + } + + return ( + + ); +}; + +export default function FormControlLabelCssVars() { + return ( + + + + + + + div': { + placeSelf: 'center', + }, + }} + > + + + December + + {itemData.map((item) => ( + + {item.title} + + + ))} + + + + + ); +} diff --git a/packages/mui-material/src/ImageListItemBar/ImageListItemBar.js b/packages/mui-material/src/ImageListItemBar/ImageListItemBar.js index a8d8ef7a2068ac..bebc8ea36f138f 100644 --- a/packages/mui-material/src/ImageListItemBar/ImageListItemBar.js +++ b/packages/mui-material/src/ImageListItemBar/ImageListItemBar.js @@ -72,7 +72,7 @@ const ImageListItemBarTitleWrap = styled('div', { return { flexGrow: 1, padding: '12px 16px', - color: theme.palette.common.white, + color: (theme.vars || theme).palette.common.white, overflow: 'hidden', ...(ownerState.position === 'below' && { padding: '6px 0 12px',