-
-
Notifications
You must be signed in to change notification settings - Fork 676
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix/automated-list-meeting-and-others
- Loading branch information
Showing
80 changed files
with
37,045 additions
and
11,925 deletions.
There are no files selected for viewing
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
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
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,23 @@ | ||
import type { StorybookConfig } from "@storybook/nextjs"; | ||
|
||
const config: StorybookConfig = { | ||
stories: [ | ||
"../components/**/*.mdx", | ||
"../components/**/*.stories.@(js|jsx|mjs|ts|tsx)", | ||
], | ||
addons: [ | ||
"@storybook/addon-onboarding", | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-interactions", | ||
], | ||
docs: { | ||
defaultName: 'Documentation', | ||
}, | ||
framework: { | ||
name: "@storybook/nextjs", | ||
options: {}, | ||
}, | ||
staticDirs: ["../public"], | ||
}; | ||
export default config; |
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,40 @@ | ||
import React from "react"; | ||
import "../styles/globals.css"; | ||
import type { Preview } from "@storybook/react"; | ||
import { | ||
Title, | ||
Subtitle, | ||
Description, | ||
Primary, | ||
Controls, | ||
Stories, | ||
} from '@storybook/blocks'; | ||
|
||
const preview: Preview = { | ||
tags: ['autodocs'], | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
docs: { | ||
toc: { | ||
title: 'Table of contents', | ||
}, | ||
page: () => ( | ||
<> | ||
<Title /> | ||
<Subtitle /> | ||
<Description /> | ||
<Primary /> | ||
<Controls /> | ||
<Stories /> | ||
</> | ||
) | ||
} | ||
} | ||
}; | ||
|
||
export default preview; |
Validating CODEOWNERS rules …
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
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
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
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,20 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import Avatar from './Avatar'; | ||
|
||
const meta: Meta<typeof Avatar> = { | ||
title: 'Components/Avatar', | ||
component: Avatar | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof Avatar>; | ||
|
||
export const DefaultAvatar: Story = { | ||
args: { | ||
name: 'Avatar', | ||
link: 'https://www.asyncapi.com/', | ||
photo: '/favicon-32x32.png' | ||
} | ||
}; |
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,41 @@ | ||
import React from 'react'; | ||
|
||
interface AvatarProps { | ||
// eslint-disable-next-line prettier/prettier | ||
|
||
/** The name of the avatar. */ | ||
name: string; | ||
|
||
/** The photo of the avatar. */ | ||
photo: string; | ||
|
||
/** The link of the avatar. */ | ||
link?: string; | ||
|
||
/** The class name to be applied to the avatar. */ | ||
className: string; | ||
} | ||
|
||
/** | ||
* This component renders avatar. | ||
*/ | ||
export default function Avatar({ name, photo, link, className }: AvatarProps) { | ||
const avatar = ( | ||
<img | ||
title={name} | ||
className={`size-10 rounded-full border-2 border-white object-cover hover:z-50 ${className}`} | ||
src={photo} | ||
loading='lazy' | ||
data-testid='Avatars-img' | ||
alt={name} | ||
/> | ||
); | ||
|
||
return link ? ( | ||
<a href={link} data-testid='Avatars-link'> | ||
{avatar} | ||
</a> | ||
) : ( | ||
<React.Fragment>{avatar}</React.Fragment> | ||
); | ||
} |
Oops, something went wrong.