Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix darkmode
  • Loading branch information
mcasimir committed May 14, 2025
commit 14162cc62ef370b31116ed8fd140c01be3d9d9f4
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
showPrompt,
ConfirmationModalVariant,
} from './use-confirmation';
import Button from '@leafygreen-ui/button';

<Meta title="Hooks/useConfirmationModal" component={ConfirmationModalArea} />

Expand Down Expand Up @@ -72,7 +73,7 @@ function MyComponent() {

return (
<ConfirmationModalArea>
<button onClick={handleClick}>Show Confirmation</button>
<Button onClick={handleClick}>Show Confirmation</Button>
</ConfirmationModalArea>
);

Expand All @@ -96,7 +97,7 @@ function MyComponent() {

return (
<ConfirmationModalArea>
<button onClick={handleClick}>Delete Database</button>
<Button onClick={handleClick}>Delete Database</Button>
</ConfirmationModalArea>
);

Expand All @@ -121,7 +122,7 @@ function MyComponent() {

return (
<ConfirmationModalArea>
<button onClick={handleClick}>Dangerous Action</button>
<Button onClick={handleClick}>Dangerous Action</Button>
</ConfirmationModalArea>
);

Expand All @@ -145,7 +146,7 @@ function MyComponent() {

return (
<ConfirmationModalArea>
<button onClick={handleClick}>Show Prompt</button>
<Button onClick={handleClick}>Show Prompt</Button>
</ConfirmationModalArea>
);

Expand Down
13 changes: 7 additions & 6 deletions packages/compass-components/src/hooks/use-toast.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Meta, Story, Controls } from '@storybook/blocks';
import { ToastArea, openToast } from './use-toast';
import Button from '@leafygreen-ui/button';

<Meta title="Hooks/useToast" component={ToastArea} />

Expand All @@ -23,7 +24,7 @@ function MyComponent() {

return (
<ToastArea>
<button onClick={handleSuccess}>Show Success Toast</button>
<Button onClick={handleSuccess}>Show Success Toast</Button>
</ToastArea>
);
}
Expand Down Expand Up @@ -58,7 +59,7 @@ function MyComponent() {

return (
<ToastArea>
<button onClick={handleClick}>Show Success Toast</button>
<Button onClick={handleClick}>Show Success Toast</Button>
</ToastArea>
);

Expand All @@ -80,7 +81,7 @@ function MyComponent() {

return (
<ToastArea>
<button onClick={handleClick}>Show Error Toast</button>
<Button onClick={handleClick}>Show Error Toast</Button>
</ToastArea>
);

Expand Down Expand Up @@ -111,7 +112,7 @@ function MyComponent() {

return (
<ToastArea>
<button onClick={handleClick}>Show Progress Toast</button>
<Button onClick={handleClick}>Show Progress Toast</Button>
</ToastArea>
);

Expand All @@ -128,13 +129,13 @@ function MyComponent() {
variant: 'note',
title: 'New version available',
description: 'A new version of the application is ready to install',
actionElement: <button onClick={() => console.log('Update clicked')}>Update Now</button>
actionElement: <Button onClick={() => console.log('Update clicked')}>Update Now</Button>
});
};

return (
<ToastArea>
<button onClick={handleClick}>Show Toast with Action</button>
<Button onClick={handleClick}>Show Toast with Action</Button>
</ToastArea>
);

Expand Down