import React from 'react';
import clsx from 'clsx';
import { BaseProps } from '@digigov/react-core/Base';

export interface TestVariantProps extends BaseProps<'div'> {
  title?: string;
}

export const TestVariant = React.forwardRef<HTMLDivElement, TestVariantProps>(
  function TestVariant({ title, children, ...props }) {
    return (
      <div
        className={clsx({
          'ds-test-variant': true,
        })}
        {...props}
      >
        <h1 className="ds-test-variant__title"> {title} </h1>
        <div className="ds-test-variant__content">{children}</div>
      </div>
    );
  }
);

export default TestVariant;
