Created
October 13, 2020 19:47
-
-
Save ljmotta/037150ed39021d2e984de3e1b97ffae0 to your computer and use it in GitHub Desktop.
Base64Png Editor Add IsDirty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Added on the end of the NavList an isDirty indicator. | |
*/ | |
<NavItem itemId={0}> | |
<div className={"base64png-editor--tweaks-nav-item"}> | |
<p>Invert</p> | |
<Switch | |
id="invert-switch" | |
isDisabled={disabled} | |
isChecked={invert === "100"} | |
onChange={(value) => tweakInvert(value ? "100" : "0")} | |
/> | |
</div> | |
</NavItem> | |
{stateControl.isDirty() && ( | |
<div style={{ display: "flex", alignItems: "center", padding: "20px" }}> | |
<p style={{ color: "red" }}>Image was Edited!</p> | |
</div> | |
)} | |
</NavList> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment