-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Kbd } from '@nextui-org/react' | ||
import { Meta, StoryObj } from '@storybook/react' | ||
import React from 'react' | ||
|
||
import AuthModal from '@/components/auth-modal/auth-modal' | ||
import AuthModalFooter from '@/components/auth-modal/auth-modal-footer' | ||
import AuthModalHeader from '@/components/auth-modal/auth-modal-header' | ||
|
||
const meta = { | ||
component: AuthModal, | ||
title: 'Components/AuthModal', | ||
} satisfies Meta<typeof AuthModal> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const Basic: Story = { | ||
args: { | ||
children: ( | ||
<> | ||
<AuthModalHeader title="Iniciar sesión en"> | ||
Lorem ipsum... | ||
</AuthModalHeader> | ||
<AuthModalFooter> | ||
Esta plataforma es exclusiva para miembros de la Universidad de | ||
Córdoba. Inicia sesión con tu correo corporativo <Kbd>@uco.es</Kbd>{' '} | ||
para tener acceso. | ||
</AuthModalFooter> | ||
</> | ||
), | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Meta, StoryObj } from '@storybook/react' | ||
|
||
import BookBreadcrumbs from '@/components/book-breadcrumbs/book-breadcrumbs' | ||
|
||
const meta = { | ||
component: BookBreadcrumbs, | ||
title: 'Components/BookBreadcrumbs', | ||
} satisfies Meta<typeof BookBreadcrumbs> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const Basic: Story = { | ||
args: { | ||
title: 'Children', | ||
}, | ||
parameters: { | ||
nextjs: { | ||
appDirectory: true, | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { Meta, StoryObj } from '@storybook/react' | ||
|
||
import BookCard from '@/components/book-card/book-card' | ||
|
||
const meta = { | ||
component: BookCard, | ||
title: 'Components/BookCard', | ||
} satisfies Meta<typeof BookCard> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const Available: Story = { | ||
args: { | ||
book: { | ||
authors: ['Jane Doe'], | ||
id: 'book', | ||
image: '/images/book.jpeg', | ||
title: 'A book', | ||
}, | ||
}, | ||
} | ||
|
||
export const Unavailable: Story = { | ||
args: { | ||
book: { | ||
authors: ['Jane Doe'], | ||
id: 'book', | ||
image: '/images/book.jpeg', | ||
loan: { | ||
id: 'load', | ||
startsAt: new Date(), | ||
user: { | ||
id: 'user', | ||
image: '/images/avatar.png', | ||
name: 'Jane Doe', | ||
}, | ||
}, | ||
title: 'A book', | ||
}, | ||
}, | ||
} | ||
|
||
export const Loaned: Story = { | ||
args: { | ||
book: { | ||
authors: ['Jane Doe'], | ||
id: 'book', | ||
image: '/images/book.jpeg', | ||
loan: { | ||
id: 'load', | ||
startsAt: new Date(), | ||
user: { | ||
id: 'user', | ||
image: '/images/avatar.png', | ||
name: 'Jane Doe', | ||
}, | ||
}, | ||
title: 'A book', | ||
}, | ||
me: { | ||
email: '[email protected]', | ||
id: 'user', | ||
image: '/images/avatar.png', | ||
name: 'Jane Doe', | ||
roles: ['ROLE_USER'], | ||
}, | ||
}, | ||
} |