-
-
Notifications
You must be signed in to change notification settings - Fork 364
[TogglePasswordComponent] Add documentation for usage without Symfony Forms #1101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TogglePasswordComponent] Add documentation for usage without Symfony Forms #1101
Conversation
e94ea97
to
6f2810c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the toggle-password-container
class that should wrap the input (or at least something that has position: relative)?
src/TogglePassword/doc/index.rst
Outdated
placeholder="Password" | ||
{{ stimulus_controller('@symfony/ux-toggle-password--toggle-password', { | ||
visibleIcon: 'Default', // Here you can pass an SVG tag or a string. Default is the value for the default svg | ||
visibleLabel: 'Show', // This field is optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
visibleLabel: 'Show', // This field is optional | |
visibleLabel: 'Show', // optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll move it to controller.ts
too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weaverryan I would like to propose this :
{{ stimulus_controller('symfony/ux-toggle-password/toggle-password', {
{# visibleLabel: 'Show password', // If you want to modify this label. #}
{# visibleIcon: 'Some svg icon', // If you want to modify this icon. #}
{# hiddenLabel: 'Hide password', // If you want to modify this label. #}
{# hiddenIcon: 'Some svg icon', // If you want to modify this icon. #}
buttonClasses: ['toggle-password-button'], // Add as many classes as you wish. "toggle-password-button" is needed to activate the default CSS.
}) }}
WDYT ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's a good idea, as these are different than the form field options (which are camelcase), so mentioning these here is a good idea 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have fixed this here : #1125 🙏 😄
104b290
to
6817c63
Compare
I have added the div with |
6817c63
to
2890380
Compare
Thank you Damien! |
I would like to propose this improvement for the Toggle Password documentation.
I wanted to add this component to a login form and the documentation did not have example with native HTML forms.
So the example is the following :
I really look forward for reviews to improve this example if needed.
Thanks a lot.