14 lines
275 B
TypeScript
14 lines
275 B
TypeScript
export type DebugProps = {
|
|
'data-debug-id': string
|
|
}
|
|
|
|
export function debugProps(
|
|
id: string,
|
|
_component?: string,
|
|
_file?: string
|
|
): DebugProps | Record<string, never> {
|
|
if (process.env.NODE_ENV === 'production') return {}
|
|
return {
|
|
'data-debug-id': id,
|
|
}
|
|
}
|