Skip to content

Commit

Permalink
Update weekly story
Browse files Browse the repository at this point in the history
  • Loading branch information
dcantatore committed Jun 15, 2024
1 parent 6abc6aa commit db4d549
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/components/Repeat/RepeatWeekly.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import React from "react";
import { Meta, StoryFn } from "@storybook/react";
import { Frequency } from "rrule";
import RepeatWeekly from "./RepeatWeekly";
import useBuilderStore from "../../store/builderStore";

export default {
title: "Repeat/RepeatWeekly",
component: RepeatWeekly,
} as Meta<typeof RepeatWeekly>;

const Template: StoryFn<typeof RepeatWeekly> = (args) => <RepeatWeekly {...args} />;

export const Primary = Template.bind({});
Primary.args = {
value: {
interval: 1,
byDay: [],
},
onChange: (value) => console.log(value),
const Template: StoryFn<typeof RepeatWeekly> = () => {
const builderStore = useBuilderStore();
return (
<RepeatWeekly value={builderStore.repeatDetails} onChange={builderStore.setRepeatDetails} />
);
};

export const Primary = Template;

0 comments on commit db4d549

Please sign in to comment.