diff --git a/docs/data/material/components/icons/TwoToneIcons.js b/docs/data/material/components/icons/TwoToneIcons.js index 125785fdc2f975..cc52d9c1a8fa67 100644 --- a/docs/data/material/components/icons/TwoToneIcons.js +++ b/docs/data/material/components/icons/TwoToneIcons.js @@ -1,6 +1,21 @@ import * as React from 'react'; +import { useTheme } from '@mui/material/styles'; import Icon from '@mui/material/Icon'; +const useIsDarkMode = () => { + const theme = useTheme(); + return theme.palette.mode === 'dark'; +}; + export default function TwoToneIcons() { - return add_circle; + const isDarkMode = useIsDarkMode(); + + return ( + + add_circle + + ); } diff --git a/docs/data/material/components/icons/TwoToneIcons.tsx b/docs/data/material/components/icons/TwoToneIcons.tsx index 125785fdc2f975..cc52d9c1a8fa67 100644 --- a/docs/data/material/components/icons/TwoToneIcons.tsx +++ b/docs/data/material/components/icons/TwoToneIcons.tsx @@ -1,6 +1,21 @@ import * as React from 'react'; +import { useTheme } from '@mui/material/styles'; import Icon from '@mui/material/Icon'; +const useIsDarkMode = () => { + const theme = useTheme(); + return theme.palette.mode === 'dark'; +}; + export default function TwoToneIcons() { - return add_circle; + const isDarkMode = useIsDarkMode(); + + return ( + + add_circle + + ); } diff --git a/docs/data/material/components/icons/TwoToneIcons.tsx.preview b/docs/data/material/components/icons/TwoToneIcons.tsx.preview index 7fb5fde04dbe59..82be925bbaaa31 100644 --- a/docs/data/material/components/icons/TwoToneIcons.tsx.preview +++ b/docs/data/material/components/icons/TwoToneIcons.tsx.preview @@ -1 +1,6 @@ -add_circle \ No newline at end of file + + add_circle + \ No newline at end of file