Skip to content

Commit

Permalink
Fix slider UX (#2596)
Browse files Browse the repository at this point in the history
* Fix slider UX

* Add snapshot
  • Loading branch information
karriebear committed Jan 13, 2021
1 parent 90e8b0a commit e052271
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions e2e/specs/st_slider.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ describe("st.slider", () => {
cy.visit("http://localhost:3000/");
});

it("looks right", () => {
cy.get(".stSlider")
.first()
.matchImageSnapshot("slider");
});

it("shows labels", () => {
cy.get(".stSlider label").should("have.text", "Label 1" + "Label 2");
});
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend/src/components/widgets/Slider/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ class Slider extends React.PureComponent<Props, State> {
InnerTrack: {
style: ({ $disabled }: { $disabled: boolean }) => ({
height: "4px",
background: $disabled ? colors.lightGray : "initial",
...($disabled ? { background: colors.lightGray } : {}),
}),
},
ThumbValue: this.renderThumbValue,
Expand Down

0 comments on commit e052271

Please sign in to comment.