Skip to content

Commit

Permalink
chore: updates simple slider story due to changes to props
Browse files Browse the repository at this point in the history
  • Loading branch information
atweedie committed Jan 31, 2025
1 parent a1274de commit 23d3fb9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 33 deletions.
33 changes: 0 additions & 33 deletions src/stories/SimpleSlider.stories.js

This file was deleted.

30 changes: 30 additions & 0 deletions src/stories/SimpleSlider.stories.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React, { useState } from "react";
import { SimpleSlider } from "../components/core/SimpleSlider";

export default {
title: "Core/SimpleSlider",
component: SimpleSlider,
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
tags: ["autodocs"],
parameters: {
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
layout: "fullscreen"
},
args: {
label: "A Simple Slider",
minValue: 0,
maxValue: 100,
step: 1,
showLabel: true,
}
};

export const Default = {
render: (args) => {
const [value, setValue] = useState(50);

const handleChange = (newValue) => setValue(newValue);

return <SimpleSlider onChange={handleChange} value={value} {...args} />
}
}

0 comments on commit 23d3fb9

Please sign in to comment.