import cx from "../../../../utils/css/cx.js";
import useDateFormat from "../../../../hooks/useDateFormat/index.js";
import classes from '../styles.module.scss';
const cls = cx.merge(classes);
export default function NamedElection({
  namedElex,
  noNum
}) {
  const [{
    date,
    label
  }] = namedElex;
  const day = useDateFormat(date, {
    format: '{D}',
    timeZone: 'UTC'
  });
  return <div className={cls('sticker', {
    'no-num': noNum
  })}>
      {!noNum && <span>{day}</span>}
      <p>
        <b>{label}</b>
      </p>
    </div>;
}