2022-06-20 02:42:34 +00:00
|
|
|
import { h, ComponentChildren, JSX } from 'preact';
|
|
|
|
import cs from 'classnames';
|
2022-05-10 13:52:06 +00:00
|
|
|
|
2022-06-03 22:30:39 +00:00
|
|
|
import styles from './css/Inset.module.css';
|
|
|
|
|
2022-06-20 02:42:34 +00:00
|
|
|
interface InsetProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
|
|
children: ComponentChildren;
|
|
|
|
}
|
|
|
|
|
2022-05-10 13:52:06 +00:00
|
|
|
/**
|
|
|
|
* Convenience component for a nice beveled border.
|
|
|
|
*
|
|
|
|
* @returns Inset component
|
|
|
|
*/
|
2022-06-20 02:42:34 +00:00
|
|
|
export const Inset = ({ children, className, ...props }: InsetProps) => (
|
|
|
|
<div className={cs(className, styles.inset)} {...props}>
|
2022-05-10 13:52:06 +00:00
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
);
|