'Customize Theme with Material UI when dark mode selected

In my createTheme I have the following:

export default createTheme({
  palette: {
    mode: 'dark',
    primary: {
        main: '#000000',
    },
  }

But my AppBar <AppBar position='static' color='primary'> isn't changing color. What can I do to my code to ensure that while dark mode is selected that my customized theme changes with it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source