import cx from 'classnames'; import React from 'react'; import css from './list.module.css'; // -- TYPES export interface IListProps extends React.HTMLAttributes {} export interface IItemProps extends React.LiHTMLAttributes { children: React.ReactNode; } // -- COMPONENTS function Item({ className, children, ...domAttrs }: IItemProps) { const cn = cx(className, css.item); return (
  • {children}
  • ); } // -- MAIN function List({ className, children, ...domAttrs }: IListProps) { const cn = cx(className, css.list); return ( ); } List.Item = Item; export default List;