fix theme state not updating correctly

pull/5370/head
Joseph Izang 2 years ago committed by Aniket
parent c60f11191d
commit 7b7ee8a553
  1. 2
      apps/remix-ide/src/app/plugins/solidity-umlgen.tsx
  2. 2
      libs/remix-ui/solidity-uml-gen/src/lib/solidity-uml-gen.tsx

@ -56,6 +56,8 @@ export class SolidityUmlGen extends ViewPlugin implements ISolidityUmlGen {
const umlClasses = convertAST2UmlClasses(ast, this.currentFile)
const umlDot = convertUmlClasses2Dot(umlClasses)
const payload = vizRenderStringSync(umlDot)
const currentTheme = await this.call('theme', 'currentTheme')
this.currentlySelectedTheme = currentTheme.quality
this.updatedSvg = payload
this.renderComponent()
} catch (error) {

@ -80,7 +80,7 @@ export function RemixUiSolidityUmlGen ({ plugin, updatedSvg, loading, themeSelec
</div>
)
const Display = () => {
const invert = themeSelected === 'dark' ? 'invert(1)' : 'invert(0)'
const invert = themeSelected === 'dark' ? 'invert(0.8)' : 'invert(0)'
return (
<div className="d-flex flex-column justify-content-center align-items-center">
<div id="umlImageHolder" className="w-100 px-2 py-2">

Loading…
Cancel
Save