Skip to content

toggleswitch: стилизация, сторисы, обёртки#19

Open
khaliulin wants to merge 5 commits intofeature/styles-debugfrom
form.inputswitch
Open

toggleswitch: стилизация, сторисы, обёртки#19
khaliulin wants to merge 5 commits intofeature/styles-debugfrom
form.inputswitch

Conversation

@khaliulin
Copy link
Copy Markdown

No description provided.

selector: 'toggleswitch',
standalone: true,
imports: [ToggleSwitch, FormsModule],
providers: [
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

 Нужны еще Form Validators, на случай если необходимы валидации формы

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@ichiesov stories переведены на FormControl и Validators в 413a903

Comment on lines +29 to +30
@Input() invalid = false;
@Input() disabled = false;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

invalid и disabled должны считытваться через FormControl
Апи использования должно быть такое

const control = new FormControl({value: false, disabled: true}, [Validators.required])
control.enable();
control.disable();


control.setErrors({invalid: true});

все через формы, не прокидывая пропсы

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@ichiesov убран @input invalid/disabled, читается из NgControl 07116ad

Copy link
Copy Markdown
Collaborator

@ichiesov ichiesov left a comment

Choose a reason for hiding this comment

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

Нужна экспертиза с точки зрения UI
Мне кажется, что визуал состояния hover и checked не соответствует фигме.

@khaliulin
Copy link
Copy Markdown
Author

@ichiesov отображение корректное #19 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants