Skip to content

Commit

Permalink
Celebration update
Browse files Browse the repository at this point in the history
  • Loading branch information
dani-moreno committed Nov 29, 2024
1 parent 4989c7d commit d85ea2b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export default meta

type Story = StoryObj<typeof Celebration>

// Fixed date for the example stories
const exampleDate = new Date(2024, 11, 13, 20, 0)

export const Default: Story = {
decorators: [
(Story) => (
Expand All @@ -30,10 +33,7 @@ export const Default: Story = {
src="https://github.com/josepjaume.png"
type="birthday"
typeLabel="Birthday"
date={{
day: 29,
month: "November",
}}
date={exampleDate}
/>
</div>
<div className="w-48">
Expand All @@ -44,10 +44,7 @@ export const Default: Story = {
src="https://github.com/nlopin.png"
type="anniversary"
typeLabel="Anniversary"
date={{
day: 4,
month: "December",
}}
date={exampleDate}
/>
</div>
</>
Expand All @@ -69,10 +66,7 @@ export const NoImage: Story = {
canReact: false,
type: "first-day",
typeLabel: "First day very long name",
date: {
day: 15,
month: "December",
},
date: exampleDate,
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ export type CelebrationProps = {
canReact?: boolean
type?: "birthday" | "anniversary" | "first-day"
typeLabel: string
date: {
day: number
month: string
}
date: Date
}

export const BaseCelebration = ({
Expand Down Expand Up @@ -75,7 +72,7 @@ export const BaseCelebration = ({
</div>
</div>
<div className="shrink-0">
<DateAvatar month={date.month} day={date.day} />
<DateAvatar date={date} />
</div>
</div>
</Link>
Expand Down

0 comments on commit d85ea2b

Please sign in to comment.