canopy
canopy copied to clipboard
[BUG] JsonView does not inherit theme values
Describe the bug
Because JsonView is instantiated with a style argument, it does not natively inherit theme changes.
Steps to reproduce
- Go to wallet and enable dark mode
- Refresh the page
- Go to accounts tab and submit a transaction and observe the json
Expected behavior
JsonView should be instantiated with the currently set theme selection.
Screenshots
Environment
- Browser: Chrome
Additional context
JsonView has importable themes and requires a style argument when instantiated:
import { lightTheme } from '@uiw/react-json-view/light';
import { darkTheme } from '@uiw/react-json-view/dark';
<JsonView value={object} style={darkTheme} />
<JsonView value={object} style={lightTheme} />
Required Tags
- Priority: Low
- Module: Wallet
@andrewnguyen22 this can be closed.