Skip to content
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

Merged
merged 16 commits into from Oct 1, 2020
Merged

Conversation

YakOFF19
Copy link
Contributor

@YakOFF19 YakOFF19 commented Sep 4, 2020

Добавлена возможность передать child.
Дочерний элемент может быть расположен справа или слева от тоггла.
Значение переключается в том числе при клике по child.

Closes #1723

packages/react-ui/components/Toggle/Toggle.tsx Outdated Show resolved Hide resolved
packages/react-ui/components/Toggle/Toggle.tsx Outdated Show resolved Hide resolved
packages/react-ui/components/Toggle/Toggle.tsx Outdated Show resolved Hide resolved
packages/react-ui/components/Toggle/Toggle.styles.ts Outdated Show resolved Hide resolved
Copy link
Member

@lossir lossir left a 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`

Скриншотные тесты тоже не помешали бы. Надо бы потестировать базовую линию, и многострочный вариант, ко всему прочему.

packages/react-ui/components/Toggle/Toggle.styles.ts Outdated Show resolved Hide resolved
packages/react-ui/components/Toggle/Toggle.tsx Outdated Show resolved Hide resolved
packages/react-ui/components/Toggle/Toggle.tsx Outdated Show resolved Hide resolved
packages/react-ui/components/Toggle/Toggle.styles.ts Outdated Show resolved Hide resolved
@YakOFF19 YakOFF19 force-pushed the toggle-add-child-1723 branch 2 times, most recently from 0533d77 to 9fe06f6 Compare September 10, 2020 07:02
packages/react-ui/components/Toggle/Toggle.tsx Outdated Show resolved Hide resolved
packages/react-ui/components/Toggle/Toggle.tsx Outdated Show resolved Hide resolved
packages/react-ui/components/Toggle/Toggle.styles.ts Outdated Show resolved Hide resolved
packages/react-ui/components/Toggle/Toggle.tsx Outdated Show resolved Hide resolved
Copy link
Member

@lossir lossir left a 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/Toggle.styles.ts Outdated Show resolved Hide resolved
packages/react-ui/components/Toggle/Toggle.styles.ts Outdated Show resolved Hide resolved
packages/react-ui/components/Toggle/Toggle.styles.ts Outdated Show resolved Hide resolved
@zhzz zhzz mentioned this pull request Sep 15, 2020
21 tasks
@YakOFF19 YakOFF19 requested a review from zhzz September 16, 2020 09:30
Copy link
Member

@zhzz zhzz left a 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/Toggle.styles.ts Outdated Show resolved Hide resolved
packages/react-ui/internal/themes/DefaultTheme.ts Outdated Show resolved Hide resolved
packages/react-ui/components/Toggle/Toggle.tsx Outdated Show resolved Hide resolved
@zhzz zhzz removed the in progress label Sep 28, 2020
@zhzz
Copy link
Member

zhzz commented Sep 28, 2020

Подправил скриншоты DropdownMenu в IE. Они были не совсем корректными. Я не выявил прямой зависимости между их падением и изменениями в Тоггле. Но вроде ничего на самом деле не сломалось.

zhzz
zhzz previously approved these changes Sep 28, 2020
@zhzz zhzz merged commit 2d505c2 into master Oct 1, 2020
@zhzz zhzz deleted the toggle-add-child-1723 branch October 1, 2020 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Toggle] Добавить проп children
5 participants