Skip to content

Commit

Permalink
refactor: Update stories to remove files referencing the same "kind"
Browse files Browse the repository at this point in the history
  • Loading branch information
anicholls committed Nov 18, 2020
1 parent ccdeaad commit 220c4f7
Show file tree
Hide file tree
Showing 48 changed files with 421 additions and 543 deletions.
38 changes: 28 additions & 10 deletions modules/_labs/color-picker/react/stories/stories_VisualTesting.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
/// <reference path="../../../../../typings.d.ts" />
/** @jsx jsx */
import {jsx} from '@emotion/core';
import React from 'react';
import {colors} from '@workday/canvas-kit-react-core';
import {StaticStates} from '@workday/canvas-kit-labs-react-core';
import {ComponentStatesTable, withSnapshotsEnabled} from '../../../../../utils/storybook';
import {ComponentStatesTable, withSnapshotsEnabled, Story} from '../../../../../utils/storybook';
import ColorPicker from '../lib/ColorPicker';

export default withSnapshotsEnabled({
export default {
title: 'Testing/React/Labs/Color Picker',
component: ColorPicker,
parameters: {
chromatic: {
pauseAnimationAtEnd: true,
},
},
});
};

export const InputInteraction = () => {
const textAreaRef = React.useRef(null);
const [color, setColor] = React.useState('');
const handleColorChange = (c: string) => {
setColor(c);
textAreaRef.current?.focus();
};
return (
<div className="App">
<ColorPicker showCustomHexInput onColorChange={handleColorChange} />
<label htmlFor="test">Text Area</label>
<textarea id="test" style={{color: color}} ref={textAreaRef} />
</div>
);
};

// eslint-disable-next-line no-empty-function
const noop = () => {};

export const ColorPickerStates = () => (
export const ColorPickerStates = withSnapshotsEnabled(() => (
<StaticStates>
<ComponentStatesTable
rowProps={[
Expand Down Expand Up @@ -48,4 +60,10 @@ export const ColorPickerStates = () => (
{props => <ColorPicker {...props} onColorChange={noop} />}
</ComponentStatesTable>
</StaticStates>
);
));

ColorPickerStates.parameters = {
chromatic: {
pauseAnimationAtEnd: true,
},
};
23 changes: 0 additions & 23 deletions modules/_labs/color-picker/react/stories/stories_testing.tsx

This file was deleted.

169 changes: 0 additions & 169 deletions modules/_labs/select/react/stories/stories_testing.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions modules/_labs/select/react/stories/stories_theming.tsx

This file was deleted.

Loading

0 comments on commit 220c4f7

Please sign in to comment.