import { Comment as CommentData } from '@ts/types/comments'; import Comment from '@components/Comment/Comment'; import { t } from '@lingui/macro'; import styles from './CommentsList.module.scss'; const CommentsList = ({ articleId, comments, }: { articleId: number; comments: CommentData[]; }) => { const getCommentsList = () => { return comments.map((comment) => { return ( ); }); }; return ( <>

{t`Comments`}

{comments.length > 0 ? (
    {getCommentsList()}
) : (

{t`No comments yet.`}

)} ); }; export default CommentsList; alt='cgit logo'/> index : www.armandphilippot.com
The frontend of my personal website.Armand Philippot
aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/forms/theme-toggle.stories.tsx
blob: 5ebf5a2fbf8b5e40acd000248a749d696ed667e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { ComponentMeta, ComponentStory } from '@storybook/react';
import ThemeToggle from './theme-toggle';

/**
 * ThemeToggle - Storybook Meta
 */
export default {
  title: 'Molecules/Forms/Toggle',
  component: ThemeToggle,
  argTypes: {
    labelClassName: {
      control: {
        type: 'text',
      },
      description: 'Set additional classnames to the label wrapper.',
      table: {
        category: 'Styles',
      },
      type: {
        name: 'string',
        required: false,
      },
    },
  },
} as ComponentMeta<typeof ThemeToggle>;

const Template: ComponentStory<typeof ThemeToggle> = (args) => (
  <ThemeToggle {...args} />
);

/**
 * Toggle Stories - Theme
 */
export const Theme = Template.bind({});