Skip to content

Commit

Permalink
fix(): Fix build errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanCQ committed Sep 12, 2024
1 parent daa55fe commit a7f3b38
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions stories/custom/theme-selector.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Meta, StoryObj } from "@storybook/react";
import { ThemeSelector, useMode } from "src/custom/theme-selector";
import { ThemeSelector, useTheme } from "src/custom/theme-selector";
export function ThemeSelectorDemo() {
const { mode, setMode } = useMode();
return <ThemeSelector mode={mode} setMode={setMode} />;
const { theme, setMode } = useTheme();
return <ThemeSelector theme={theme} setMode={setMode} />;
}

const meta: Meta<typeof ThemeSelectorDemo> = {
Expand Down
2 changes: 1 addition & 1 deletion stories/shadcn/multi-select.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
const Demo = (args: ComponentProps<typeof MultiSelect>) => {
const [value, setValue] = React.useState(args.value);
return (
<MultiSelect onSearch={(v) => {
<MultiSelect value={value} onValueChange={(v) => {
setValue(v)
}}>
<MultiSelectTrigger className="w-96">
Expand Down
6 changes: 2 additions & 4 deletions stories/shadcn/sonner.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ import * as sonner from 'sonner'
const SonnerDemo = (props: {defaultStyles: Boolean}) => {
return props.defaultStyles ? (
<div>
<SonnerToast closeButton duration={9000000}>
</SonnerToast>
<SonnerToast closeButton duration={9000000}/>
<Button onClick={() => sonner.toast.success('Success!')}>Show Toast</Button>
</div>
) : (
<div>
<SonnerToast closeButton duration={9000000} toastOptions={{classNames: {toast: 'group-[.toaster]:bg-green-500 group-[.toaster]:border-green-700'}}}>
</SonnerToast>
<SonnerToast closeButton duration={9000000} toastOptions={{classNames: {toast: 'group-[.toaster]:bg-green-500 group-[.toaster]:border-green-700'}}}/>
<Button onClick={() => sonner.toast.info('Info: this toast has overriden styles.')}>
Show Styled Toast
</Button>
Expand Down

0 comments on commit a7f3b38

Please sign in to comment.