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