packages/travix-ui-kit/components/list/list.js
function List(props) {
  warnAboutDeprecatedProp(props.mods, 'mods', 'className');

  const {
    align,
    className,
    dataAttrs,
    hideBullets,
    items,
  } = props;

  const mods = props.mods ? props.mods.slice() : [];

  mods.push(`align_${align}`);

  if (hideBullets) {
    mods.push("no-bullets");
  }

  const listClasses = classNames(getClassNamesWithMods('ui-list', mods), className);

  const itemsBlock = items.filter(Boolean).map((item, index) => (
    <li className="ui-list__item" key={index}>
      {item}
    </li>
  ));

  return (
    <ul className={listClasses} {...getDataAttributes(dataAttrs)}>
      {itemsBlock}
    </ul>
  );
}
function List(props) {
  warnAboutDeprecatedProp(props.mods, 'mods', 'className');

  const {
    align,
    className,
    dataAttrs,
    hideBullets,
    items,
  } = props;

  const mods = props.mods ? props.mods.slice() : [];

  mods.push(`align_${align}`);

  if (hideBullets) {
    mods.push("no-bullets");
  }

  const listClasses = classNames(getClassNamesWithMods('ui-list', mods), className);

  const itemsBlock = items.filter(Boolean).map((item, index) => (
    <li className="ui-list__item" key={index}>
      {item}
    </li>
  ));

  return (
    <ul className={listClasses} {...getDataAttributes(dataAttrs)}>
      {itemsBlock}
    </ul>
  );
}
function List ( props ) { warnAboutDeprecatedProp ( props . mods , 'mods' , 'className' ) ; const { align , className , dataAttrs , hideBullets , items , } = props ; const mods = props . mods ? props . mods . slice ( ) : [ ] ; mods . push ( ` ${ align } ` ) ; if ( hideBullets ) { mods . push ( "no-bullets" ) ; } const listClasses = classNames ( getClassNamesWithMods ( 'ui-list' , mods ) , className ) ; const itemsBlock = items . filter ( Boolean ) . map ( ( item , index ) => ( < li className = "ui-list__item" key = { index } > { item } < / li > ) ) ; return ( < ul className = { listClasses } { ... getDataAttributes ( dataAttrs ) } > { itemsBlock } < / ul > ) ; }
General List component. Use when you need to display array of elements
General List component . Use when you need to display array of elements