Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Add molecule inputPassword #23

Merged
merged 1 commit into from
Sep 2, 2020
Merged

Conversation

tatinacher
Copy link
Member

Implement inputPassword molecule

@sergeysova sergeysova changed the title Add molecule inputPassword Add molecule inputPassword Sep 1, 2020
import * as React from 'react';
import styled, { StyledComponent } from 'styled-components';

import * as input from '../../atoms/input';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import * as input from '../../atoms/input';
import { input } from '../../atoms';

isHidden: boolean;
name: string;
onChange: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
onIconClick: React.MouseEventHandler<HTMLButtonElement>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь не нужен onIconClick, клик по иконке-глазу должен скрывать и показывать пароль автоматически

iconOpen: React.ReactNode;
isHidden: boolean;
name: string;
onChange: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
onChange: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
onChange: React.ChangeEventHandler<HTMLInputElement>;

disabled?: boolean;
iconHidden: React.ReactNode;
iconOpen: React.ReactNode;
isHidden: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это должно быть внутреннее состояние

interface InputPasswordProps {
disabled?: boolean;
iconHidden: React.ReactNode;
iconOpen: React.ReactNode;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Пусть iconOpen и iconHide будут опциональными, по умолчанию задай им иконки

@tatinacher tatinacher force-pushed the feat/RBL-264-input-password branch 2 times, most recently from 7f79f1c to 1d1f519 Compare September 1, 2020 16:54
@sergeysova sergeysova merged commit 2e25338 into master Sep 2, 2020
@sergeysova sergeysova deleted the feat/RBL-264-input-password branch September 2, 2020 11:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants