2022-09-16 10:24:33 -07:00
|
|
|
import classNames from 'clsx';
|
|
|
|
import React from 'react';
|
|
|
|
|
2022-09-16 11:34:53 -07:00
|
|
|
interface IOutlineBox extends React.HTMLAttributes<HTMLDivElement> {
|
2022-09-16 10:24:33 -07:00
|
|
|
children: React.ReactNode,
|
|
|
|
className?: string,
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Wraps children in a container with an outline. */
|
2022-09-16 11:34:53 -07:00
|
|
|
const OutlineBox: React.FC<IOutlineBox> = ({ children, className, ...rest }) => {
|
2022-09-16 10:24:33 -07:00
|
|
|
return (
|
2022-09-16 11:34:53 -07:00
|
|
|
<div
|
|
|
|
className={classNames('p-4 rounded-lg border border-solid border-gray-300 dark:border-gray-800', className)}
|
|
|
|
{...rest}
|
|
|
|
>
|
2022-09-16 10:24:33 -07:00
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default OutlineBox;
|