Skip to content

Commit

Permalink
reorganized stories and related logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbnewman committed Jan 3, 2022
1 parent b2c6a75 commit 4640b12
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ import Wrapper from './components/Wrapper';
const meta: Meta = {
title: 'usePrompt',
component: Prompter,
argTypes: {
component: {
control: {
type: null,
},
},
type: {
control: {
type: null,
},
},
},
parameters: {
controls: { expanded: true },
},
Expand Down
25 changes: 25 additions & 0 deletions stories/MultiPrompter.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from 'react';
import { Meta, Story } from '@storybook/react';
import { MultiPrompter, Props } from './components/MultiPrompter';
import Wrapper from './components/Wrapper';

const meta: Meta = {
title: 'usePrompt',
component: MultiPrompter,
parameters: {
controls: { expanded: true },
},
};

export default meta;

const Template: Story<Props> = (args) => (
<Wrapper>
<MultiPrompter {...args} />
</Wrapper>
);

export const MultiPrompt = Template.bind({});
// ExamplePrompt.args = {
// message: 'This is a modal prompt',
// };
2 changes: 1 addition & 1 deletion test/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import '@testing-library/jest-dom';
import { render, waitFor, cleanup, fireEvent } from '@testing-library/react';

import { ExamplePrompt } from '../stories/Prompter.stories';
import { ExamplePrompt } from '../stories/ExamplePrompter.stories';

describe('Modal Prompt', () => {
afterEach(() => {
Expand Down

0 comments on commit 4640b12

Please sign in to comment.