-
Notifications
You must be signed in to change notification settings - Fork 98
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
feat(PasswordInput): add component #1745
Conversation
Preview is ready. |
Visual Tests Report is ready. |
src/components/controls/PasswordInput/__tests__/PasswordInput.visual.test.tsx
Outdated
Show resolved
Hide resolved
}, []); | ||
|
||
return ( | ||
<div className={b()}> |
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.
Use Flex
component, no need to add className or any styles
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.
made via flex
@@ -0,0 +1,7 @@ | |||
.password-input-stories { |
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.
Can be done without styles, see message above
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.
deleted this style file
import en from './en.json'; | ||
import ru from './ru.json'; | ||
|
||
const COMPONENT = 'passwordInput'; |
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.
const COMPONENT = 'passwordInput'; | |
const COMPONENT = 'PasswordInput'; |
|
||
import {PasswordInputStories} from './helpersPlaywright'; | ||
|
||
test.describe('PasswordInputStories', () => { |
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.
test.describe('PasswordInputStories', () => { | |
test.describe('PasswordInput', () => { |
8a202ae
to
131354b
Compare
@ValeraS Hi, can you take a look? |
const additionalEndContent = ( | ||
<React.Fragment> | ||
{endContent || rightContent} | ||
{inputValue && showCopyButton ? ( |
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.
{inputValue && showCopyButton ? ( | |
{inputValue && showCopyButton && !props.disabled ? ( |
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.
as for me, the disable should only restrict the input of a value, copying is blocked separately
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.
Disabled controls are not interactive. If you need to interact with a control without the ability to edit it, there is a readOnly property for that.
const onClick = () => { | ||
setHideValue((hideValue) => !hideValue); | ||
}; |
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.
@NasgulNexus hey, can you look back to this issue, please? |
@ValeraS Hi! Corrected comments added revealValue |
71774aa
to
c9643fc
Compare
const {actionButtonSize, iconSize} = getActionButtonSizeAndIconSize(size); | ||
|
||
const onClick: React.MouseEventHandler<HTMLButtonElement> = (event) => { | ||
event.preventDefault(); |
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.
preventDefault
should be on mouse down
hasCopyTooltip = true, | ||
hasRevealTooltip = true, |
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.
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 suggest
- to rename
hasCopyTooltiptoshowCopyTooltip
and remove default. I think there is no need in this element by default - to rename
hasRevealTooltiptoshowRevealTooltip
and remove default. I think we can hide this eleement by default
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.
fixed
@NasgulNexus @ValeraS @amje please, come back to this PR. |
No description provided.