2023-02-06 11:28:18 -08:00
|
|
|
import clsx from 'clsx';
|
2022-09-16 10:24:33 -07:00
|
|
|
import React from 'react';
|
|
|
|
|
2022-09-16 11:34:53 -07:00
|
|
|
interface IOutlineBox extends React.HTMLAttributes<HTMLDivElement> {
|
2023-02-15 13:26:27 -08:00
|
|
|
children: React.ReactNode
|
|
|
|
className?: string
|
2022-09-16 10:24:33 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/** 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
|
2023-02-06 11:28:18 -08:00
|
|
|
className={clsx('rounded-lg border border-solid border-gray-300 p-4 dark:border-gray-800', className)}
|
2022-09-16 11:34:53 -07:00
|
|
|
{...rest}
|
|
|
|
>
|
2022-09-16 10:24:33 -07:00
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2023-02-06 11:28:18 -08:00
|
|
|
export default OutlineBox;
|