export const cn = (styles: any[]): string =>
  styles.filter(style => !!style).join(' ');

export const addAnimation = (
  element,
  animationClass: string,
  time: number = 1000,
) => {
  if (element?.classList) {
    element.classList.add(animationClass);
    setTimeout(() => element.classList.remove(animationClass), time);
  }
};
