Standardize DivDebugBaselineGrid props
This commit is contained in:
parent
86e4bf43a7
commit
fd22877580
@ -2,22 +2,23 @@
|
||||
|
||||
import { useAppState } from '@/state/AppState';
|
||||
import { clsx } from 'clsx/lite';
|
||||
import { ReactNode } from 'react';
|
||||
import { HTMLAttributes } from 'react';
|
||||
|
||||
export default function DivDebugBaselineGrid({
|
||||
children,
|
||||
className,
|
||||
}: {
|
||||
children: ReactNode
|
||||
className?: string
|
||||
}) {
|
||||
...props
|
||||
}: HTMLAttributes<HTMLDivElement>) {
|
||||
const { shouldShowBaselineGrid } = useAppState();
|
||||
|
||||
return (
|
||||
<div className={clsx(
|
||||
className,
|
||||
shouldShowBaselineGrid && 'bg-baseline-grid',
|
||||
)}>
|
||||
<div
|
||||
{...props}
|
||||
className={clsx(
|
||||
shouldShowBaselineGrid && 'bg-baseline-grid',
|
||||
className,
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user