Upgrade react and storybook

This commit is contained in:
Josh Perez 2022-06-06 20:48:02 -04:00 committed by GitHub
parent 6476a4fe73
commit 42eb4013d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
244 changed files with 15341 additions and 10249 deletions

View file

@ -3,13 +3,14 @@
import React, { useState } from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import type { PropsType } from './Slider';
import { Slider } from './Slider';
const story = storiesOf('Components/Slider', module);
export default {
title: 'Components/Slider',
};
const createProps = (): PropsType => ({
label: 'Slider Handle',
@ -17,9 +18,9 @@ const createProps = (): PropsType => ({
value: 30,
});
story.add('Default', () => <Slider {...createProps()} />);
export const Default = (): JSX.Element => <Slider {...createProps()} />;
story.add('Draggable Test', () => {
export const DraggableTest = (): JSX.Element => {
function StatefulSliderController(props: PropsType): JSX.Element {
const [value, setValue] = useState(30);
@ -27,4 +28,4 @@ story.add('Draggable Test', () => {
}
return <StatefulSliderController {...createProps()} />;
});
};