-
Notifications
You must be signed in to change notification settings - Fork 20
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
PLASMA-4068: add pointerVisibility & currentValueVisibility props to Slider & fixes #1616
Conversation
Theme Builder app deployed! https://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-1616/ |
Documentation preview deployed! website:https://plasma.sberdevices.ru/pr/pr-1616/ |
145c113
to
ebd2dc5
Compare
ebd2dc5
to
f9cb84a
Compare
f9cb84a
to
e25955f
Compare
e25955f
to
acacbd7
Compare
packages/plasma-new-hope/src/components/Slider/components/SliderBase/SliderBase.styles.ts
Outdated
Show resolved
Hide resolved
packages/plasma-new-hope/src/components/Slider/ui/Handler/Handler.styles.ts
Outdated
Show resolved
Hide resolved
packages/plasma-new-hope/src/components/Slider/ui/Handler/Handler.styles.ts
Outdated
Show resolved
Hide resolved
packages/plasma-new-hope/src/components/Slider/ui/Handler/Handler.tsx
Outdated
Show resolved
Hide resolved
packages/plasma-new-hope/src/components/Slider/components/Single/Single.types.ts
Outdated
Show resolved
Hide resolved
packages/plasma-new-hope/src/examples/plasma_b2c/components/Slider/Slider.stories.tsx
Show resolved
Hide resolved
* always - всегда отображать | ||
* hover - при наведении на Slider | ||
*/ | ||
currentValueVisibility: 'always' | 'hover'; |
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.
Раньше у нас был только проп showCurrentValue
, включение и выключение которого регулировало наличие / отсутствие текущего значения.
Теперь, чтобы показывать значение, нам нужны сразу два пропа (надо showCurrentValue
выставить в true
, а ещё выставить нужное значение для currentValueVisibility
)
Предлагаю оставить только один, currentValueVisibility
со значениями 'always' | 'hover' | 'none'
.
Что думаешь?
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.
можно и один указывать, showCurrentValue
. он точно останется для обратной совместимости. просто я значения по умолчанию не прописал, для currentValueVisibility = 'always'
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.
Да, showCurrentValue
должен остаться для обратной совместимости. Но как будто в дальнейшем достаточно только currentValueVisibility
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.
для обратной совместимости оставили showCurrentValue и currentValueVisibility с вариантами always/hover
packages/plasma-new-hope/src/examples/plasma_b2c/components/Slider/Slider.stories.tsx
Outdated
Show resolved
Hide resolved
acacbd7
to
d783e88
Compare
d783e88
to
e1886a2
Compare
Core
Slider
pointerVisibility
,currentValueVisibility
What/why changed
📦 Published PR as canary version:
Canary Versions
✨ Test out this PR locally via: