import * as React from 'react';
import { Container } from '@nova-hf/ui';

import s from './Segment.module.scss';

interface ISegmentProps {
  children: React.ReactNode;
  container?: boolean;
}

export const Segment = ({ children, container = true }: ISegmentProps) => {
  const content = container ? <Container>{children}</Container> : children;

  return <section className={s.segment}>{content}</section>;
};
