import * as React from 'react'; import { Box, Container, Grid, Typography } from '@mui/material'; import { NymLogo } from '@nymproject/react/logo/NymLogo'; import { Playground } from '@nymproject/react/playground/Playground'; import { useIsMounted } from '@nymproject/react/hooks/useIsMounted'; import { NymThemeProvider } from '@nymproject/mui-theme'; import { useTheme } from '@mui/material/styles'; import { ThemeToggle } from './ThemeToggle'; import { AppContextProvider, useAppContext } from './context'; export const AppTheme: React.FC = ({ children }) => { const { mode } = useAppContext(); return {children}; }; export const Content: React.FC = () => { const { mode } = useAppContext(); const theme = useTheme(); const isMounted = useIsMounted(); if (isMounted()) { console.log('Content is mounted'); } const swatches: Record = { 'palette.primary.main': theme.palette.primary.main, 'palette.secondary.main': theme.palette.secondary.main, 'palette.info.main': theme.palette.info.main, 'palette.success.main': theme.palette.success.main, 'palette.text.primary': theme.palette.text.primary, 'theme.palette.nym.networkExplorer.mixnodes.status.active': theme.palette.nym.networkExplorer.mixnodes.status.active, 'theme.palette.nym.networkExplorer.mixnodes.status.standby': theme.palette.nym.networkExplorer.mixnodes.status.standby, }; return (

Example App

palette.nym.networkExplorer.mixnodes.status.active }}> This is an example app that uses React, Typescript, Webpack and the Nym theme + components.

Some colours from the theme (mode = {mode}) are:

{Object.keys(swatches).map((key) => ( {swatches[key]}
{key}
))}

Component playground

); }; export const App: React.FC = () => ( );