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(Toggle): add prop 'child' and 'childPosition' #2121
Conversation
1a97689
to
bec683c
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.
Предлагаю добавить пример в Toggle.md
.
Ещё текст коммита "устарел", касательно названий пропов. К тому же, пропchildren
доступен всегда. Просто сейчас ты начал его использовать. Поэтому текст коммита стоит заменить на что подобное:
feat(Toggle): add caption support by using `children`
Скриншотные тесты тоже не помешали бы. Надо бы потестировать базовую линию, и многострочный вариант, ко всему прочему.
0533d77
to
9fe06f6
Compare
9fe06f6
to
6173dd3
Compare
6173dd3
to
42d4d14
Compare
42d4d14
to
984a207
Compare
91d79e9
to
d67aea2
Compare
packages/react-ui/components/Toggle/__stories__/Toggle.stories.tsx
Outdated
Show resolved
Hide resolved
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.
Осталось совсем по-мелочи)
packages/react-ui/components/Toggle/__stories__/Toggle.stories.tsx
Outdated
Show resolved
Hide resolved
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.
По непонятной пока причине падают старые тесты. Позже попробую разобраться.
Подправил скриншоты DropdownMenu в IE. Они были не совсем корректными. Я не выявил прямой зависимости между их падением и изменениями в Тоггле. Но вроде ничего на самом деле не сломалось. |
Добавлена возможность передать child.
Дочерний элемент может быть расположен справа или слева от тоггла.
Значение переключается в том числе при клике по child.
Closes #1723