aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/atoms/lists/list/list-item.tsx
blob: 3438eac6821acab26decbec110ec95c5b39f8bb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import type { FC, LiHTMLAttributes } from 'react';
import styles from './list.module.scss';

export type ListItemProps = LiHTMLAttributes<HTMLElement>;

/**
 * ListItem component
 *
 * Used it inside a `<List />` component.
 */
export const ListItem: FC<ListItemProps> = ({
  children,
  className = '',
  ...props
}) => {
  const itemClass = `${styles.item} ${className}`;

  return (
    <li {...props} className={itemClass}>
      {children}
    </li>
  );
};