Skip to content

Commit

Permalink
Add button to UnconnectedAccountAlert story for manual trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
staging-devin-ai-integration[bot] committed Jun 20, 2024
1 parent 7ac72d4 commit 067d163
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { useState } from 'react';
import type { Meta, StoryObj } from '@storybook/react';
import UnconnectedAccountAlert from './unconnected-account-alert';

Expand All @@ -24,7 +24,16 @@ export default meta;
type Story = StoryObj<typeof UnconnectedAccountAlert>;

export const DefaultStory: Story = {
render: () => <UnconnectedAccountAlert />,
render: () => {
const [showAlert, setShowAlert] = useState(false);

return (
<div>
<button onClick={() => setShowAlert(true)}>Show Alert</button>
{showAlert && <UnconnectedAccountAlert />}
</div>
);
},
};

DefaultStory.storyName = 'Default';

0 comments on commit 067d163

Please sign in to comment.