import React from 'react';

interface Props {
	overskrift?: string;
	children: React.ReactNode;
	className?: string;
}

export function OppsummeringUnderpunkt(props: Props) {
	const { overskrift, children, className, ...rest } = props;

	return (
		<div
			className={`oppsummering-underpunkt${
				!!className ? ' ' + className : ''
			}`}
			{...rest}
		>
			{!!overskrift && <h5>{overskrift}</h5>}
			{children}
		</div>
	);
}
