diff --git a/snippets/PasswordRevealer.md b/snippets/PasswordRevealer.md index 731f1030b..7e27c3e09 100644 --- a/snippets/PasswordRevealer.md +++ b/snippets/PasswordRevealer.md @@ -2,36 +2,23 @@ Renders a password input field with a reveal button. -Initially set `state.shown` to `false` to ensure that the password is not shown by default. -Create a method, `toggleShown`, which uses `Component.prototype.setState` to change the input's state from shown to hidden and vice versa, bind it to the component's context. -In the`render()` method, use a`
` to wrap both the`` and the ` -
- ); - } + return ( +
+ {}} + /> + +
+ ); } ```