Skip to content

Infra/ designTokens disabled Slider #2033

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

Merged
merged 1 commit into from
May 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/components/slider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ export default class Slider extends PureComponent<SliderProps, State> {
{...this._panResponder.panHandlers}
style={[
styles.thumb,
disabled && styles.disabledThumb,
thumbStyle,
{
backgroundColor: disabled ? DEFAULT_COLOR : thumbTintColor || ACTIVE_COLOR
Expand Down Expand Up @@ -621,6 +622,9 @@ const styles = StyleSheet.create({
shadowRadius: SHADOW_RADIUS,
elevation: 2
},
disabledThumb: {
borderColor: Colors.$backgroundElevated
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this token is only for the disabled thumb? The active one is white (as defined in line 618), shouldn't it be tokenized as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the active slider, the thumb should be white for both dark and light modes.
For the disabled slider, it should be elevated (white in light mode and grey1 in dark)

},
activeThumb: {
width: THUMB_SIZE + 16,
height: THUMB_SIZE + 16,
Expand Down